Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1252)

Unified Diff: include/core/SkSurface.h

Issue 1784563002: unify peekPixels around pixmap parameter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update GrUploadPixmapToTexture to know about the new desc if readPixels was called Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkImage.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkSurface.h
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index 7a0352994ae143a96c5b4f6312307e5c5d0d7b6a..b873c24d55690640e81684cdd281ec7a52f90dd8 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -257,15 +257,18 @@ public:
/**
* If the surface 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 while
+ * RAM) return true, and if not null, set the pixmap parameter to point to the information
+ * about the surface's pixels. The pixel address in the pixmap is only valid while
* the surface object is in scope, and no API call is made on the surface
* or its canvas.
*
- * On failure, returns NULL and the info and rowBytes parameters are
- * ignored.
+ * On failure, returns false and the pixmap parameter is ignored.
*/
+ bool peekPixels(SkPixmap*);
+
+#ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS
const void* peekPixels(SkImageInfo* info, size_t* rowBytes);
+#endif
/**
* Copy the pixels from the surface into the specified buffer (pixels + rowBytes),
« no previous file with comments | « include/core/SkImage.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698