Index: include/core/SkDevice.h |
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h |
index c23b2973ee27eadc4f79619817aa7898543bb501..de43d1e8b88fd5c6acfd6613299e753425930652 100644 |
--- a/include/core/SkDevice.h |
+++ b/include/core/SkDevice.h |
@@ -82,9 +82,24 @@ public: |
bool writePixels(const SkImageInfo&, const void*, size_t rowBytes, int x, int y); |
+ /** |
+ * Try to get write-access to the pixels behind the device. If successful, this returns true |
+ * and fills-out the pixmap parameter. On success it also bumps the genID of the underlying |
+ * bitmap. |
+ * |
+ * On failure, returns false and ignores the pixmap parameter. |
+ */ |
bool accessPixels(SkPixmap* pmap); |
/** |
+ * Try to get read-only-access to the pixels behind the device. If successful, this returns |
+ * true and fills-out the pixmap parameter. |
+ * |
+ * On failure, returns false and ignores the pixmap parameter. |
+ */ |
+ bool peekPixels(SkPixmap*); |
+ |
+ /** |
* Return the device's associated gpu render target, or NULL. |
*/ |
virtual GrRenderTarget* accessRenderTarget() { return NULL; } |
@@ -241,7 +256,6 @@ protected: |
const SkMatrix*, const SkPaint&); |
bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y); |
- bool peekPixels(SkPixmap*); |
/////////////////////////////////////////////////////////////////////////// |