From ae3714f27af58502341e02f1ae8ed6552505ed89 Mon Sep 17 00:00:00 2001 From: caryclark Date: Tue, 21 Jul 2015 09:15:53 -0700 Subject: [PATCH] make varied_text* gm portable TBR=reed@google.com Review URL: https://codereview.chromium.org/1244063002 --- gm/variedtext.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gm/variedtext.cpp b/gm/variedtext.cpp index 989bebd328..b2b96b34c5 100644 --- a/gm/variedtext.cpp +++ b/gm/variedtext.cpp @@ -59,10 +59,10 @@ protected: SkScalar h = SkIntToScalar(size.fHeight); SK_COMPILE_ASSERT(4 == SK_ARRAY_COUNT(fTypefacesToUnref), typeface_cnt); - fTypefacesToUnref[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kNormal); - fTypefacesToUnref[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kBold); - fTypefacesToUnref[2] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal); - fTypefacesToUnref[3] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold); + fTypefacesToUnref[0] = sk_tool_utils::create_portable_typeface_always("sans-serif", SkTypeface::kNormal); + fTypefacesToUnref[1] = sk_tool_utils::create_portable_typeface_always("sans-serif", SkTypeface::kBold); + fTypefacesToUnref[2] = sk_tool_utils::create_portable_typeface_always("serif", SkTypeface::kNormal); + fTypefacesToUnref[3] = sk_tool_utils::create_portable_typeface_always("serif", SkTypeface::kBold); SkRandom random; for (int i = 0; i < kCnt; ++i) { @@ -75,6 +75,7 @@ protected: fColors[i] = random.nextU(); fColors[i] |= 0xFF000000; + fColors[i] = sk_tool_utils::color_to_565(fColors[i]); static const SkScalar kMinPtSize = 8.f; static const SkScalar kMaxPtSize = 32.f;