Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Unified Diff: src/utils/debugger/SkDrawCommand.cpp

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698