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

Unified Diff: gm/textblobmixedsizes.cpp

Issue 1760163002: Avoid drawing NVPR DIF text when text size is 0 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment Created 4 years, 10 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 | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textblobmixedsizes.cpp
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp
index 330d33f62cfd603dce4eff6e1fb99397658e3ca9..86ab0ac8fbecb4ab4e2e3ed97a90fe93138f992a 100644
--- a/gm/textblobmixedsizes.cpp
+++ b/gm/textblobmixedsizes.cpp
@@ -73,6 +73,13 @@ protected:
sk_tool_utils::add_to_text_blob(&builder, text, paint, 0, yOffset);
+ // Zero size.
+ paint.measureText(text, strlen(text), &bounds);
+ yOffset += bounds.height();
+ paint.setTextSize(0);
+
+ sk_tool_utils::add_to_text_blob(&builder, text, paint, 0, yOffset);
+
// build
fBlob.reset(builder.build());
}
« no previous file with comments | « no previous file | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698