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

Unified Diff: gm/textbloblooper.cpp

Issue 1263553002: make pixelsnap textblob* etc gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add more 565 compatibility Created 5 years, 5 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 | « gm/surface.cpp ('k') | gm/textblobshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textbloblooper.cpp
diff --git a/gm/textbloblooper.cpp b/gm/textbloblooper.cpp
index 2fbd30b3cf56e8fa0fdfc690d3be56f2bf41aa43..337942c68fadfba136ea865ae2d0b1f184cc87b6 100644
--- a/gm/textbloblooper.cpp
+++ b/gm/textbloblooper.cpp
@@ -148,6 +148,7 @@ protected:
paint.setSubpixelText(true);
paint.setLCDRenderText(true);
paint.setAntiAlias(true);
+ sk_tool_utils::set_portable_typeface(&paint);
add_to_text_blob(&builder, text, paint, 0, 0);
fBlob.reset(builder.build());
@@ -225,7 +226,7 @@ protected:
void onDraw(SkCanvas* canvas) override {
- canvas->drawColor(SK_ColorGRAY);
+ canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorGRAY));
SkPaint paint;
canvas->translate(10, 40);
« no previous file with comments | « gm/surface.cpp ('k') | gm/textblobshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698