Index: src/core/SkBitmapDevice.cpp |
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp |
index 098f0fc96ce95b9c12710cfb2f938a7e0e55cc40..8524f0b72b4312746d10a307767bda14b6e7acb8 100644 |
--- a/src/core/SkBitmapDevice.cpp |
+++ b/src/core/SkBitmapDevice.cpp |
@@ -268,6 +268,15 @@ void SkBitmapDevice::writePixels(const SkBitmap& bitmap, |
} |
#endif |
+void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) { |
+ if (fBitmap.getPixels()) { |
+ *info = fBitmap.info(); |
+ *rowBytes = fBitmap.rowBytes(); |
+ return fBitmap.getPixels(); |
+ } |
+ return NULL; |
+} |
+ |
static void rect_memcpy(void* dst, size_t dstRB, const void* src, size_t srcRB, size_t bytesPerRow, |
int rowCount) { |
SkASSERT(bytesPerRow <= srcRB); |