aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkLuaCanvas.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 20:21:48 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 20:21:48 +0000
commite54a23fcfa42b2fc9d320650de72bcb2d9566b2d (patch)
treebf63292c10f857384abd6a35a6fd0ff6c5a1fb96 /include/utils/SkLuaCanvas.h
parentf11943f21d985cba5af38b1609dbe8a4cfa58179 (diff)
De-virtualize SkCanvas save/restore.
This moves the state management logic into non-virtual SkCanvas methods, and turns the virtuals into protected notifiers. R=reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/194713008 git-svn-id: http://skia.googlecode.com/svn/trunk@13776 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/utils/SkLuaCanvas.h')
-rw-r--r--include/utils/SkLuaCanvas.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h
index a4f30bc349..9bc109ee14 100644
--- a/include/utils/SkLuaCanvas.h
+++ b/include/utils/SkLuaCanvas.h
@@ -20,11 +20,6 @@ public:
SkLuaCanvas(int width, int height, lua_State*, const char function[]);
virtual ~SkLuaCanvas();
- virtual int save(SaveFlags flags) SK_OVERRIDE;
- virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) SK_OVERRIDE;
- virtual void restore() SK_OVERRIDE;
-
virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
@@ -67,6 +62,10 @@ public:
virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
protected:
+ virtual void willSave(SaveFlags) SK_OVERRIDE;
+ virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
+ virtual void willRestore() SK_OVERRIDE;
+
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE;
virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;