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

Unified Diff: include/core/SkSurface.h

Issue 1643873002: allow the caller to specified raster-surface rowbytes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox for snapped image rowbytes Created 4 years, 11 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 | « no previous file | src/image/SkSurface_Raster.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 57527ed33afa1640c44755737f48cd514fb913d5..52097be66edcd6a16a6aea9ad5174b7581c71aa9 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -61,12 +61,19 @@ public:
void* context, const SkSurfaceProps* = NULL);
/**
- * Return a new surface, with the memory for the pixels automatically
- * allocated.
+ * Return a new surface, with the memory for the pixels automatically allocated, but respecting
+ * the specified rowBytes. If rowBytes==0, then a default value will be chosen. If a non-zero
+ * rowBytes is specified, then any images snapped off of this surface (via newImageSnapshot())
+ * are guaranteed to have the same rowBytes.
*
* If the requested surface cannot be created, or the request is not a
* supported configuration, NULL will be returned.
*/
+ static SkSurface* NewRaster(const SkImageInfo&, size_t rowBytes, const SkSurfaceProps*);
+
+ /**
+ * Allocate a new surface, automatically computing the rowBytes.
+ */
static SkSurface* NewRaster(const SkImageInfo&, const SkSurfaceProps* = NULL);
/**
« no previous file with comments | « no previous file | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698