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

Unified Diff: include/core/SkSurface.h

Issue 2412633002: leave pixel memory uninitialized for opaque alpha type in SkSurface::MakeRaster (Closed)
Patch Set: Created 4 years, 2 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 bb3f71975459be23ba702102e20af1a897b5c33d..8e7e148cb9eee86c947d7243fb0698a2b1454b67 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -51,10 +51,14 @@ public:
void* context, const SkSurfaceProps* = nullptr);
/**
- * Return a new surface, with the memory for the pixels automatically allocated and
- * zero-initialized, 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 makeImageSnapshot()) are guaranteed to have the same rowBytes.
+ * 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 makeImageSnapshot())
+ * are guaranteed to have the same rowBytes.
+ *
+ * If the requested alpha type is not opaque, then the surface's pixel memory will be
+ * zero-initialized. If it is opaque, then it will be left uninitialized, and the caller is
+ * responsible for initially clearing the surface.
*
* If the requested surface cannot be created, or the request is not a
* supported configuration, NULL will be returned.
« 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