diff options
author | caryclark <caryclark@google.com> | 2015-07-16 12:35:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-16 12:35:58 -0700 |
commit | d2ce18520e9055884567c5c021a0c39aeadbe820 (patch) | |
tree | b6faed5b111fa19954bdca6b2a226fd46749e7fb /gm | |
parent | bea0150d83d5b840a236cc2c8444371b121c99fe (diff) |
make imagefilters* imagemagnifier imageresizetiled portable
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1238083004
Diffstat (limited to 'gm')
-rw-r--r-- | gm/imagefiltersbase.cpp | 3 | ||||
-rw-r--r-- | gm/imagefiltersgraph.cpp | 2 | ||||
-rw-r--r-- | gm/imagemagnifier.cpp | 4 | ||||
-rw-r--r-- | gm/imageresizetiled.cpp | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp index 6e8ac29dea..993e65413f 100644 --- a/gm/imagefiltersbase.cpp +++ b/gm/imagefiltersbase.cpp @@ -145,7 +145,7 @@ static void draw_text(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) { paint.setImageFilter(imf); paint.setColor(SK_ColorCYAN); paint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&paint); + sk_tool_utils::set_portable_typeface_always(&paint); paint.setTextSize(r.height()/2); paint.setTextAlign(SkPaint::kCenter_Align); canvas->drawText("Text", 4, r.centerX(), r.centerY(), paint); @@ -283,6 +283,7 @@ protected: SkPaint::kAntiAlias_Flag | SkPaint::kLCDRenderText_Flag, }; SkPaint paint(origPaint); + sk_tool_utils::set_portable_typeface_always(&paint); paint.setTextSize(30); SkAutoCanvasRestore acr(canvas, true); diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp index cfedaf0256..fb3d79fef3 100644 --- a/gm/imagefiltersgraph.cpp +++ b/gm/imagefiltersgraph.cpp @@ -113,7 +113,7 @@ protected: canvas.clear(SK_ColorTRANSPARENT); SkPaint paint; paint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&paint); + sk_tool_utils::set_portable_typeface_always(&paint); paint.setColor(SK_ColorWHITE); paint.setTextSize(SkIntToScalar(96)); const char* str = "e"; diff --git a/gm/imagemagnifier.cpp b/gm/imagemagnifier.cpp index 5e4835033a..2e739cf38e 100644 --- a/gm/imagemagnifier.cpp +++ b/gm/imagemagnifier.cpp @@ -45,8 +45,8 @@ protected: int x = rand.nextULessThan(WIDTH); int y = rand.nextULessThan(HEIGHT); SkPaint paint; - sk_tool_utils::set_portable_typeface(&paint); - paint.setColor(rand.nextBits(24) | 0xFF000000); + sk_tool_utils::set_portable_typeface_always(&paint); + paint.setColor(sk_tool_utils::color_to_565(rand.nextBits(24) | 0xFF000000)); paint.setTextSize(rand.nextRangeScalar(0, 300)); paint.setAntiAlias(true); canvas->drawText(str, strlen(str), SkIntToScalar(x), diff --git a/gm/imageresizetiled.cpp b/gm/imageresizetiled.cpp index bc640bc6aa..724f950446 100644 --- a/gm/imageresizetiled.cpp +++ b/gm/imageresizetiled.cpp @@ -56,7 +56,7 @@ protected: }; SkPaint textPaint; textPaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&textPaint); + sk_tool_utils::set_portable_typeface_always(&textPaint); textPaint.setTextSize(SkIntToScalar(100)); int posY = 0; for (unsigned i = 0; i < SK_ARRAY_COUNT(str); i++) { |