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

Unified Diff: include/utils/SkCanvasStateUtils.h

Issue 645773002: Turn SkCanvasStateUtils into a class with static functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « include/core/SkCanvas.h ('k') | no next file » | 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 6ea7b10307439ab285d2a97e1a13a51dbf77c697..3071c7547ce7e9a9a9689c67b131248d2cb09333 100644
--- a/include/utils/SkCanvasStateUtils.h
+++ b/include/utils/SkCanvasStateUtils.h
@@ -27,7 +27,8 @@ class SkCanvasState;
* ReleaseCanvasState(...) |||
*
*/
-namespace SkCanvasStateUtils {
+class SK_API SkCanvasStateUtils {
+public:
/**
* Captures the current state of the canvas into an opaque ptr that is safe
* to pass to a different instance of Skia (which may be the same version,
@@ -47,7 +48,7 @@ namespace SkCanvasStateUtils {
* to reconstruct the canvas. The caller is responsible for calling
* ReleaseCanvasState to free the memory associated with this state.
*/
- SK_API SkCanvasState* CaptureCanvasState(SkCanvas* canvas);
+ static SkCanvasState* CaptureCanvasState(SkCanvas* canvas);
/**
* Create a new SkCanvas from the captured state of another SkCanvas. The
@@ -61,7 +62,7 @@ namespace SkCanvasStateUtils {
* identical to the captured canvas. The caller is responsible for
* calling unref on the SkCanvas.
*/
- SK_API SkCanvas* CreateFromCanvasState(const SkCanvasState* state);
+ static SkCanvas* CreateFromCanvasState(const SkCanvasState* state);
/**
* Free the memory associated with the captured canvas state. The state
@@ -71,7 +72,7 @@ namespace SkCanvasStateUtils {
*
* @param state The captured state you wish to dispose of.
*/
- SK_API void ReleaseCanvasState(SkCanvasState* state);
+ static void ReleaseCanvasState(SkCanvasState* state);
};
#endif
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698