From 108b5b2c23f2a44ab80b23183e6e962fc3b541e8 Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 15 Jul 2015 06:18:47 -0700 Subject: [PATCH] make linepaths gm portable TBR=reed@google.com Review URL: https://codereview.chromium.org/1225303010 --- gm/linepaths.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gm/linepaths.cpp b/gm/linepaths.cpp index 4fb6641..2f5c692 100644 --- a/gm/linepaths.cpp +++ b/gm/linepaths.cpp @@ -82,8 +82,7 @@ protected: SkPaint titlePaint; titlePaint.setColor(SK_ColorBLACK); titlePaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&titlePaint); - titlePaint.setLCDRenderText(true); + sk_tool_utils::set_portable_typeface_always(&titlePaint); titlePaint.setTextSize(15 * SK_Scalar1); const char title[] = "Line Drawn Into Rectangle Clips With " "Indicated Style, Fill and Linecaps, with stroke width 10"; @@ -112,7 +111,7 @@ protected: canvas->translate(rect.width() + 40 * SK_Scalar1, 0); } - SkColor color = 0xff007000; + SkColor color = sk_tool_utils::color_to_565(0xff007000); this->drawPath(path.fPath, canvas, color, rect, gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, gFills[fill].fFill, SK_Scalar1*10); @@ -127,8 +126,7 @@ protected: SkPaint labelPaint; labelPaint.setColor(color); labelPaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&labelPaint); - labelPaint.setLCDRenderText(true); + sk_tool_utils::set_portable_typeface_always(&labelPaint); labelPaint.setTextSize(10 * SK_Scalar1); canvas->drawText(gStyles[style].fName, strlen(gStyles[style].fName), @@ -226,8 +224,7 @@ protected: SkPaint titlePaint; titlePaint.setColor(SK_ColorBLACK); titlePaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&titlePaint); - titlePaint.setLCDRenderText(true); + sk_tool_utils::set_portable_typeface_always(&titlePaint); titlePaint.setTextSize(15 * SK_Scalar1); const char title[] = "Line Closed Drawn Into Rectangle Clips With " "Indicated Style, Fill and Linecaps, with stroke width 10"; @@ -256,7 +253,7 @@ protected: canvas->translate(rect.width() + 40 * SK_Scalar1, 0); } - SkColor color = 0xff007000; + SkColor color = sk_tool_utils::color_to_565(0xff007000); this->drawPath(path.fPath, canvas, color, rect, gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, gFills[fill].fFill, SK_Scalar1*10); @@ -271,8 +268,7 @@ protected: SkPaint labelPaint; labelPaint.setColor(color); labelPaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&labelPaint); - labelPaint.setLCDRenderText(true); + sk_tool_utils::set_portable_typeface_always(&labelPaint); labelPaint.setTextSize(10 * SK_Scalar1); canvas->drawText(gStyles[style].fName, strlen(gStyles[style].fName), -- 2.7.4