aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/debugger/SkDebugCanvas.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 /src/utils/debugger/SkDebugCanvas.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 'src/utils/debugger/SkDebugCanvas.h')
-rw-r--r--src/utils/debugger/SkDebugCanvas.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 0bbb640a98..24824c964d 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -206,14 +206,8 @@ public:
const uint16_t indices[], int indexCount,
const SkPaint&) SK_OVERRIDE;
- virtual void restore() SK_OVERRIDE;
-
virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
- virtual int save(SaveFlags) SK_OVERRIDE;
-
- virtual int saveLayer(const SkRect* bounds, const SkPaint*, SaveFlags) SK_OVERRIDE;
-
virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
@@ -248,6 +242,10 @@ public:
}
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;