De-virtualize SkCanvas matrix ops.
This moves the matrix management logic into non-virtual SkCanvas
methods, and turns the virtuals into protected notifiers.
R=reed@google.com, robertphillips@google.com, bsalomon@google.com
BUG=skia:2297
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/195793012
git-svn-id: http://skia.googlecode.com/svn/trunk@13799 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index bf3758d..1191a76 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -145,8 +145,6 @@
virtual void clear(SkColor) SK_OVERRIDE;
- virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
-
virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;
@@ -206,16 +204,6 @@
const uint16_t indices[], int indexCount,
const SkPaint&) SK_OVERRIDE;
- virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
-
- virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
-
- virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
-
- virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
-
- virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
-
static const int kVizImageHeight = 256;
static const int kVizImageWidth = 256;
@@ -246,6 +234,13 @@
virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
virtual void willRestore() SK_OVERRIDE;
+ virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE;
+ virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE;
+ virtual void didRotate(SkScalar) SK_OVERRIDE;
+ virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE;
+ virtual void didConcat(const SkMatrix&) SK_OVERRIDE;
+ virtual void didSetMatrix(const SkMatrix&) 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;