diff options
author | tfarina <tfarina@chromium.org> | 2014-10-10 06:19:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-10 06:19:09 -0700 |
commit | a5414c4a8efc3119ee20fcee96c0bf68a04909c7 (patch) | |
tree | dacfac3ef78ce55b2c8723a17c8001d5c91e7510 /include/utils/SkCanvasStateUtils.h | |
parent | 40636a53037eadd957b8e43f0961f640aaa93e84 (diff) |
Turn SkCanvasStateUtils into a class with static functions.
That simplifies the way to declare it a friend, as needed in SkCanvas.
BUG=skia:2914
TEST=make most
R=reed@google.com
Review URL: https://codereview.chromium.org/645773002
Diffstat (limited to 'include/utils/SkCanvasStateUtils.h')
-rw-r--r-- | include/utils/SkCanvasStateUtils.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/utils/SkCanvasStateUtils.h b/include/utils/SkCanvasStateUtils.h index 6ea7b10307..3071c7547c 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 |