Index: src/image/SkImage_Raster.cpp |
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp |
index 4a18f4aef22aeb0b7ee32ac94ba7f676721ebe90..5e1e8a02f3ef3ef72098fb279acc4b2794202c92 100644 |
--- a/src/image/SkImage_Raster.cpp |
+++ b/src/image/SkImage_Raster.cpp |
@@ -55,6 +55,7 @@ public: |
virtual ~SkImage_Raster(); |
virtual void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) SK_OVERRIDE; |
+ virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE; |
// exposed for SkSurface_Raster via SkNewImageFromPixelRef |
SkImage_Raster(const SkImage::Info&, SkPixelRef*, size_t rowBytes); |
@@ -108,6 +109,11 @@ void SkImage_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPa |
canvas->drawBitmap(fBitmap, x, y, paint); |
} |
+bool SkImage_Raster::getROPixels(SkBitmap* dst) const { |
+ *dst = fBitmap; |
+ return true; |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
SkImage* SkImage::NewRasterCopy(const SkImage::Info& info, const void* pixels, size_t rowBytes) { |