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

Unified Diff: include/utils/SkCanvasStateUtils.h

Issue 372003002: Change SkCanvasState to use inheritance. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Windows failures. Created 6 years, 5 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/utils/SkCanvasStateUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkCanvasStateUtils.h
diff --git a/include/utils/SkCanvasStateUtils.h b/include/utils/SkCanvasStateUtils.h
index f8266c9b324ce753d5087300cc2b89360b8fad18..6ea7b10307439ab285d2a97e1a13a51dbf77c697 100644
--- a/include/utils/SkCanvasStateUtils.h
+++ b/include/utils/SkCanvasStateUtils.h
@@ -13,9 +13,9 @@
class SkCanvasState;
/**
- * A set of functions that are useful for copying an SkCanvas across a library
- * boundary where the Skia libraries on either side of the boundary may not be
- * version identical. The expected usage is outline below...
+ * A set of functions that are useful for copying the state of an SkCanvas
+ * across a library boundary where the Skia library on the other side of the
+ * boundary may be newer. The expected usage is outline below...
*
* Lib Boundary
* CaptureCanvasState(...) |||
@@ -30,8 +30,8 @@ class SkCanvasState;
namespace SkCanvasStateUtils {
/**
* Captures the current state of the canvas into an opaque ptr that is safe
- * to pass between different instances of Skia (which may or may not be the
- * same version). The function will return NULL in the event that one of the
+ * to pass to a different instance of Skia (which may be the same version,
+ * or may be newer). The function will return NULL in the event that one of the
* following conditions are true.
* 1) the canvas device type is not supported (currently only raster is supported)
* 2) the canvas clip type is not supported (currently only non-AA clips are supported)
@@ -56,7 +56,7 @@ namespace SkCanvasStateUtils {
* 1) the captured state is in an unrecognized format
* 2) the captured canvas device type is not supported
*
- * @param canvas The canvas you wish to capture the current state of.
+ * @param state Opaque object created by CaptureCanvasState.
* @return NULL or an SkCanvas* whose devices and matrix/clip state are
* identical to the captured canvas. The caller is responsible for
* calling unref on the SkCanvas.
@@ -66,7 +66,8 @@ namespace SkCanvasStateUtils {
/**
* Free the memory associated with the captured canvas state. The state
* should not be released until all SkCanvas objects created using that
- * state have been dereferenced.
+ * state have been dereferenced. Must be called from the same library
+ * instance that created the state via CaptureCanvasState.
*
* @param state The captured state you wish to dispose of.
*/
« no previous file with comments | « no previous file | src/utils/SkCanvasStateUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698