diff options
author | reed <reed@google.com> | 2016-03-09 14:26:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-09 14:26:26 -0800 |
commit | 6ceeebd37a43d879c120b6ba100ae1febdd67a18 (patch) | |
tree | 6c4dfeb68ba4183bc2e63d8888ae01f24caede88 /include/core/SkCanvas.h | |
parent | f842c50116863f44240f806509f14e434eabb0a8 (diff) |
unify peekPixels around pixmap parameter
requires this chrome CL to land first
https://codereview.chromium.org/1775393003/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784563002
Review URL: https://codereview.chromium.org/1784563002
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), |