Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 9fbb37bf31203f1a21222158a51d0f1da25c47c2..40862915072bb6f7b9c03c169c6a117e0bf6794d 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1040,6 +1040,15 @@ 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::onAccessTopLayerPixels(SkImageInfo* info, size_t* rowBytes) { |
+ SkBaseDevice* dev = this->getTopDevice(); |
+ return dev ? dev->accessPixels(info, rowBytes) : NULL; |
+} |
+ |
SkAutoROCanvasPixels::SkAutoROCanvasPixels(SkCanvas* canvas) { |
fAddr = canvas->peekPixels(&fInfo, &fRowBytes); |
if (NULL == fAddr) { |
@@ -1713,6 +1722,11 @@ void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { |
(void)rgn.getBoundaryPath(path); |
} |
+GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() { |
+ SkBaseDevice* dev = this->getTopDevice(); |
+ return dev ? dev->accessRenderTarget() : NULL; |
+} |
+ |
SkBaseDevice* SkCanvas::createLayerDevice(const SkImageInfo& info) { |
SkBaseDevice* device = this->getTopDevice(); |
return device ? device->createCompatibleDeviceForSaveLayer(info) : NULL; |