Index: src/utils/debugger/SkDrawCommand.cpp |
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp |
index 26d2a85a8a1baac10be3b27e26579e0a12268988..3cebca2c64588fd44f2aa9278eaf8e91eba9d6a6 100644 |
--- a/src/utils/debugger/SkDrawCommand.cpp |
+++ b/src/utils/debugger/SkDrawCommand.cpp |
@@ -10,6 +10,8 @@ |
#include "SkDrawCommand.h" |
#include "SkObjectParser.h" |
+#include "SkTextBlob.h" |
+ |
// TODO(chudy): Refactor into non subclass model. |
SkDrawCommand::SkDrawCommand(DrawType type) |
@@ -643,6 +645,26 @@ void SkDrawPosTextHCommand::execute(SkCanvas* canvas) { |
canvas->drawPosTextH(fText, fByteLength, fXpos, fConstY, fPaint); |
} |
+SkDrawTextBlobCommand::SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, |
+ const SkPaint& paint) |
+ : INHERITED(DRAW_TEXT_BLOB) |
+ , fBlob(blob) |
+ , fXPos(x) |
+ , fYPos(y) |
+ , fPaint(paint) { |
+ |
+ blob->ref(); |
+ |
+ // FIXME: push blob info |
+ fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: ")); |
+ fInfo.push(SkObjectParser::ScalarToString(x, "YPOS: ")); |
+ fInfo.push(SkObjectParser::PaintToString(paint)); |
+} |
+ |
+void SkDrawTextBlobCommand::execute(SkCanvas* canvas) { |
+ canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); |
+} |
+ |
SkDrawRectCommand::SkDrawRectCommand(const SkRect& rect, const SkPaint& paint) |
: INHERITED(DRAW_RECT) { |
fRect = rect; |