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

Unified Diff: include/effects/SkLayerRasterizer.h

Issue 313653006: Return NULL when building empty LayerRasterizer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkLayerRasterizer.h
diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h
index fc21a7cd18884d72efcf3bbe95b5245dc408fa21..9d4c8239f2fc8da3613e63036ab23b72c846173e 100644
--- a/include/effects/SkLayerRasterizer.h
+++ b/include/effects/SkLayerRasterizer.h
@@ -39,9 +39,10 @@ public:
/**
* Pass queue of layers on to newly created layer rasterizer and return it. The builder
- * *cannot* be used any more after calling this function.
+ * *cannot* be used any more after calling this function. If no layers have been added,
+ * returns NULL.
*
- * The caller is responsible for calling unref() on the returned object.
+ * The caller is responsible for calling unref() on the returned object, if non NULL.
*/
SkLayerRasterizer* detachRasterizer();
@@ -51,11 +52,11 @@ public:
* *may* be used after calling this function. It will continue to hold any layers
* previously added, so consecutive calls to this function will return identical objects,
* and objects returned by future calls to this function contain all the layers in
- * previously returned objects.
+ * previously returned objects. If no layers have been added, returns NULL.
*
* Future calls to addLayer will not affect rasterizers previously returned by this call.
*
- * The caller is responsible for calling unref() on the returned object.
+ * The caller is responsible for calling unref() on the returned object, if non NULL.
*/
SkLayerRasterizer* snapshotRasterizer() const;
« no previous file with comments | « no previous file | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698