From 85693c15c8948911afb0036a1a01bda64157a0ab Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 20 Jul 2015 10:48:01 -0700 Subject: make stroketext textblob* texteffects tileimagefilter gm portable TBR=reed@google.com Review URL: https://codereview.chromium.org/1244833002 --- gm/textblobcolortrans.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gm/textblobcolortrans.cpp') diff --git a/gm/textblobcolortrans.cpp b/gm/textblobcolortrans.cpp index cb4686e6e7..b6776813b1 100644 --- a/gm/textblobcolortrans.cpp +++ b/gm/textblobcolortrans.cpp @@ -31,7 +31,7 @@ protected: SkPaint paint; paint.setTextSize(256); const char* text = "AB"; - sk_tool_utils::set_portable_typeface(&paint); + sk_tool_utils::set_portable_typeface_always(&paint); SkRect bounds; paint.measureText(text, strlen(text), &bounds); @@ -61,7 +61,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); @@ -71,7 +71,8 @@ protected: // Colors were chosen to map to pairs of canonical colors. The GPU Backend will cache A8 // Texture Blobs based on the canonical color they map to. Canonical colors are used to // create masks. For A8 there are 8 of them. - SkColor colors[] = {SK_ColorCYAN, SK_ColorLTGRAY, SK_ColorYELLOW, SK_ColorWHITE}; + SkColor colors[] = {SK_ColorCYAN, sk_tool_utils::color_to_565(SK_ColorLTGRAY), + SK_ColorYELLOW, SK_ColorWHITE}; size_t count = SK_ARRAY_COUNT(colors); size_t colorIndex = 0; -- cgit v1.2.3