aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkSurface.h
diff options
context:
space:
mode:
authorGravatar lsalzman <lsalzman@mozilla.com>2016-10-12 16:50:16 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-12 16:50:16 -0700
commitc64ef3563dc8badac3d64544513b03df826cf8c3 (patch)
tree9e3f320873fb159acf85a6c891f927fdaa1ba253 /include/core/SkSurface.h
parent88fa7476ab923923022bcf75b72d94adf8a3b5bc (diff)
leave pixel memory uninitialized for opaque alpha type in SkSurface::MakeRaster
Diffstat (limited to 'include/core/SkSurface.h')
-rw-r--r--include/core/SkSurface.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index bb3f719754..8e7e148cb9 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.