aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkLuaCanvas.h
diff options
context:
space:
mode:
authorGravatar fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-11 21:04:41 +0000
committerGravatar fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-11 21:04:41 +0000
commit80b10518a27a47b25a7dbf3591b425a741ebf406 (patch)
tree36fa760bd4967c817b6d272c957d28c154991ed6 /include/utils/SkLuaCanvas.h
parent53ba425c91202ef4f78e45f71c330d847a1f8faa (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=robertphillips@google.com, reed@google.com Review URL: https://codereview.chromium.org/194713008 git-svn-id: http://skia.googlecode.com/svn/trunk@13747 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..ae76ec2911 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 onSave(SaveFlags) SK_OVERRIDE;
+ virtual bool onSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
+ virtual void onRestore() SK_OVERRIDE;
+
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE;
virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;