diff options
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 1b4571a09c..034e405f3d 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), |