aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkDumpCanvas.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/SkDumpCanvas.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/SkDumpCanvas.h')
-rw-r--r--include/utils/SkDumpCanvas.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h
index 5e3249cbee..c990690d94 100644
--- a/include/utils/SkDumpCanvas.h
+++ b/include/utils/SkDumpCanvas.h
@@ -74,11 +74,6 @@ public:
int getNestLevel() const { return fNestLevel; }
- virtual int save(SaveFlags) SK_OVERRIDE;
- virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags) 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;
@@ -124,6 +119,10 @@ public:
virtual void endCommentGroup() 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 onPushCull(const SkRect& cullRect) SK_OVERRIDE;
virtual void onPopCull() SK_OVERRIDE;