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

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

Issue 1559883002: [SkDebugger] Display run glyph positioning modes (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 12 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 | « no previous file | 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 bb9f2f831d8bc48647a84e12e0a031a18343fbc5..eabc20ea765b2727ccd264d8ad4f175da0c5f4f5 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -675,6 +675,12 @@ void SkDrawPosTextHCommand::execute(SkCanvas* canvas) const {
canvas->drawPosTextH(fText, fByteLength, fXpos, fConstY, fPaint);
}
+static const char* gPositioningLabels[] = {
+ "kDefault_Positioning",
+ "kHorizontal_Positioning",
+ "kFull_Positioning",
+};
+
SkDrawTextBlobCommand::SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint)
: INHERITED(kDrawTextBlob_OpType)
@@ -699,6 +705,10 @@ SkDrawTextBlobCommand::SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x,
fInfo.push(label.release());
fInfo.push(SkObjectParser::IntToString(iter.glyphCount(), "GlyphCount: "));
+ label.reset(new SkString("GlyphPositioning: "));
+ label->append(gPositioningLabels[iter.positioning()]);
+ fInfo.push(label.release());
+
iter.applyFontToPaint(&runPaint);
fInfo.push(SkObjectParser::PaintToString(runPaint));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698