Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index ab0a5237fd3eadc5a87f21c29d5150559fa10daa..0d8ddaa6018861434e150e288457795e1478a54c 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -23,10 +23,7 @@ public: |
virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE; |
virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) SK_OVERRIDE; |
virtual GrTexture* onGetTexture() SK_OVERRIDE; |
- virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE { |
- // TODO |
- return false; |
- } |
+ virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE; |
GrTexture* getTexture() { return fBitmap.getTexture(); } |
@@ -61,6 +58,10 @@ GrTexture* SkImage_Gpu::onGetTexture() { |
return fBitmap.getTexture(); |
} |
+bool SkImage_Gpu::getROPixels(SkBitmap* dst) const { |
+ return fBitmap.copyTo(dst, SkBitmap::kARGB_8888_Config); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
SkImage* SkImage::NewTexture(const SkBitmap& bitmap) { |