Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index c57ae9ae5fa4a6079aaa776a05e5ce1028808000..e8da12920f2a75768021e527d7d3cba1cdec4714 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1106,8 +1106,12 @@ const void* SkCanvas::onPeekPixels(SkImageInfo* info, size_t* rowBytes) { |
return dev ? dev->peekPixels(info, rowBytes) : NULL; |
} |
-void* SkCanvas::accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes) { |
- return this->onAccessTopLayerPixels(info, rowBytes); |
+void* SkCanvas::accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin) { |
+ void* pixels = this->onAccessTopLayerPixels(info, rowBytes); |
+ if (pixels && origin) { |
+ *origin = this->getTopDevice(false)->getOrigin(); |
+ } |
+ return pixels; |
} |
void* SkCanvas::onAccessTopLayerPixels(SkImageInfo* info, size_t* rowBytes) { |