diff options
author | caryclark <caryclark@google.com> | 2015-06-15 05:09:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-15 05:09:59 -0700 |
commit | be7f768a357aefb39c42d24b81b24d647bb6ab70 (patch) | |
tree | a5897bcb5ce6dc995cf0cfea5e72a989cc2d16a1 /gm/shadertext2.cpp | |
parent | b5b50a07abb454abaf6ab46db20c6db6f5ecf9f6 (diff) |
make gm background colors 565 compatible
Change a batch of GM tests to convert their background color
so that it is representable in 8888 and 565.
Enable portable text in those same tests to minimize platform
differences.
In a couple of bitmap tests, use portable typefaces instead of
choosing 'Times' which may or may not be available on the platform.
R=borenet@google.com
Review URL: https://codereview.chromium.org/1176243006
Diffstat (limited to 'gm/shadertext2.cpp')
-rw-r--r-- | gm/shadertext2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp index 92a0138acd..cd996b3031 100644 --- a/gm/shadertext2.cpp +++ b/gm/shadertext2.cpp @@ -43,7 +43,7 @@ struct LabeledMatrix { class ShaderText2GM : public GM { public: ShaderText2GM() { - this->setBGColor(0xFFDDDDDD); + this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); } protected: @@ -90,13 +90,13 @@ protected: SkPaint fillPaint; fillPaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&fillPaint); + sk_tool_utils::set_portable_typeface_always(&fillPaint); fillPaint.setTextSize(SkIntToScalar(kPointSize)); fillPaint.setFilterQuality(kLow_SkFilterQuality); SkPaint outlinePaint; outlinePaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&outlinePaint); + sk_tool_utils::set_portable_typeface_always(&outlinePaint); outlinePaint.setTextSize(SkIntToScalar(kPointSize)); outlinePaint.setStyle(SkPaint::kStroke_Style); outlinePaint.setStrokeWidth(0.f); @@ -112,7 +112,7 @@ protected: SkPaint labelPaint; labelPaint.setColor(0xff000000); labelPaint.setAntiAlias(true); - sk_tool_utils::set_portable_typeface(&labelPaint); + sk_tool_utils::set_portable_typeface_always(&labelPaint); labelPaint.setTextSize(12.f); canvas->translate(15.f, 15.f); |