aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/debugger
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-23 04:00:17 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-23 04:00:17 +0000
commite0d9ce890e67d02727ac2811bb456ddb64f827d4 (patch)
tree82362792c7a566145a3acbea7ba465bb38dd26fe /src/utils/debugger
parentede0c5c7784ff4bd86e268d33df89c0ac432ca5b (diff)
Make drawText calls non-virtual, to ease SkFont and TextBlob (https://codereview.chromium.org/243853006/)"
associated chrome change (to be committed with DEPS roll) https://codereview.chromium.org/248693002/ This reverts commit bfaceb53f58c9625b5471fcff35b5ca9ca3ae29c. TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/248083002 git-svn-id: http://skia.googlecode.com/svn/trunk@14321 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils/debugger')
-rw-r--r--src/utils/debugger/SkDebugCanvas.cpp16
-rw-r--r--src/utils/debugger/SkDebugCanvas.h22
2 files changed, 16 insertions, 22 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 18affcb418..ec201789fd 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -506,13 +506,13 @@ void SkDebugCanvas::drawPoints(PointMode mode, size_t count,
this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint));
}
-void SkDebugCanvas::drawPosText(const void* text, size_t byteLength,
- const SkPoint pos[], const SkPaint& paint) {
+void SkDebugCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[],
+ const SkPaint& paint) {
this->addDrawCommand(new SkDrawPosTextCommand(text, byteLength, pos, paint));
}
-void SkDebugCanvas::drawPosTextH(const void* text, size_t byteLength,
- const SkScalar xpos[], SkScalar constY, const SkPaint& paint) {
+void SkDebugCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
+ SkScalar constY, const SkPaint& paint) {
this->addDrawCommand(
new SkDrawPosTextHCommand(text, byteLength, xpos, constY, paint));
}
@@ -536,13 +536,13 @@ void SkDebugCanvas::drawSprite(const SkBitmap& bitmap, int left, int top,
this->addDrawCommand(new SkDrawSpriteCommand(bitmap, left, top, paint));
}
-void SkDebugCanvas::drawText(const void* text, size_t byteLength, SkScalar x,
- SkScalar y, const SkPaint& paint) {
+void SkDebugCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
+ const SkPaint& paint) {
this->addDrawCommand(new SkDrawTextCommand(text, byteLength, x, y, paint));
}
-void SkDebugCanvas::drawTextOnPath(const void* text, size_t byteLength,
- const SkPath& path, const SkMatrix* matrix, const SkPaint& paint) {
+void SkDebugCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
+ const SkMatrix* matrix, const SkPaint& paint) {
this->addDrawCommand(
new SkDrawTextOnPathCommand(text, byteLength, path, matrix, paint));
}
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index d89cf9491f..d4fded7c1a 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -189,13 +189,6 @@ public:
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
- virtual void drawPosText(const void* text, size_t byteLength,
- const SkPoint pos[], const SkPaint&) SK_OVERRIDE;
-
- virtual void drawPosTextH(const void* text, size_t byteLength,
- const SkScalar xpos[], SkScalar constY,
- const SkPaint&) SK_OVERRIDE;
-
virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE;
@@ -203,13 +196,6 @@ public:
virtual void drawSprite(const SkBitmap&, int left, int top,
const SkPaint*) SK_OVERRIDE;
- virtual void drawText(const void* text, size_t byteLength, SkScalar x,
- SkScalar y, const SkPaint&) SK_OVERRIDE;
-
- virtual void drawTextOnPath(const void* text, size_t byteLength,
- const SkPath& path, const SkMatrix* matrix,
- const SkPaint&) SK_OVERRIDE;
-
virtual void drawVertices(VertexMode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode*,
@@ -250,6 +236,14 @@ protected:
virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
+ const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[],
+ const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
+ SkScalar constY, const SkPaint&) SK_OVERRIDE;
+ virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
+ const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE;
virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE;
virtual void onPopCull() SK_OVERRIDE;