aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/debugger/SkDrawCommand.cpp14
-rw-r--r--src/utils/debugger/SkDrawCommand.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 3a073962cc..b9742c3535 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -666,6 +666,20 @@ void SkDrawTextBlobCommand::execute(SkCanvas* canvas) {
canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint);
}
+bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const {
+ canvas->clear(SK_ColorWHITE);
+ canvas->save();
+
+ SkRect bounds = fBlob->bounds().makeOffset(fXPos, fYPos);
+ xlate_and_scale_to_bounds(canvas, bounds);
+
+ canvas->drawTextBlob(fBlob.get(), fXPos, fYPos, fPaint);
+
+ canvas->restore();
+
+ return true;
+}
+
SkDrawRectCommand::SkDrawRectCommand(const SkRect& rect, const SkPaint& paint)
: INHERITED(DRAW_RECT) {
fRect = rect;
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index f3c8cca9de..def0db4d8a 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -441,6 +441,7 @@ public:
SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint);
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
+ virtual bool render(SkCanvas* canvas) const SK_OVERRIDE;
private:
SkAutoTUnref<const SkTextBlob> fBlob;