Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 1b4571a09c9c65b9b3fdcfde71431636a1d39736..034e405f3d623a2bb57457812b19b11fe4874f27 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -212,16 +212,19 @@ public: |
/** |
* If the canvas has readable pixels in its base layer (and is not recording to a picture |
* or other non-raster target) and has direct access to its pixels (i.e. they are in |
- * local RAM) return the const-address of those pixels, and if not null, |
- * return the ImageInfo and rowBytes. The returned address is only valid |
+ * local RAM) return true, and if not null, return in the pixmap parameter information about |
+ * the pixels. The pixmap's pixel address is only valid |
* while the canvas object is in scope and unchanged. Any API calls made on |
- * canvas (or its parent surface if any) will invalidate the |
- * returned address (and associated information). |
+ * canvas (or its parent surface if any) will invalidate the pixel address |
+ * (and associated information). |
* |
- * On failure, returns NULL and the info and rowBytes parameters are |
- * ignored. |
+ * On failure, returns false and the pixmap parameter will be ignored. |
*/ |
+ bool peekPixels(SkPixmap*); |
+ |
+#ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS |
const void* peekPixels(SkImageInfo* info, size_t* rowBytes); |
+#endif |
/** |
* Copy the pixels from the base-layer into the specified buffer (pixels + rowBytes), |