mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Add SkiaSurface::swapBitmap()
This commit is contained in:
parent
46a03b1f4c
commit
6b25004b48
@ -76,7 +76,7 @@ public:
|
||||
SkRect dstRect = SkRect::Make(SkIRect::MakeXYWH(0, 0, result.width(), result.height()));
|
||||
canvas.drawBitmapRectToRect(m_bitmap, &srcRect, dstRect);
|
||||
|
||||
m_bitmap.swap(result);
|
||||
swapBitmap(result);
|
||||
}
|
||||
|
||||
void* nativeHandle() override {
|
||||
@ -204,6 +204,10 @@ public:
|
||||
return m_bitmap;
|
||||
}
|
||||
|
||||
void swapBitmap(SkBitmap& other) {
|
||||
m_bitmap.swap(other);
|
||||
}
|
||||
|
||||
private:
|
||||
SkBitmap m_bitmap;
|
||||
};
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
bm.pixelRef()->setURI(filename);
|
||||
|
||||
SkiaSurface* sur = new SkiaSurface();
|
||||
sur->bitmap().swap(bm);
|
||||
sur->swapBitmap(bm);
|
||||
return sur;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user