diff --git a/src/she/skia/skia_surface.h b/src/she/skia/skia_surface.h index bf4954a83..96135b057 100644 --- a/src/she/skia/skia_surface.h +++ b/src/she/skia/skia_surface.h @@ -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; }; diff --git a/src/she/skia/skia_system.h b/src/she/skia/skia_system.h index d436b1575..355705e22 100644 --- a/src/she/skia/skia_system.h +++ b/src/she/skia/skia_system.h @@ -72,7 +72,7 @@ public: bm.pixelRef()->setURI(filename); SkiaSurface* sur = new SkiaSurface(); - sur->bitmap().swap(bm); + sur->swapBitmap(bm); return sur; } }