From be7f768a357aefb39c42d24b81b24d647bb6ab70 Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 15 Jun 2015 05:09:59 -0700 Subject: 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 --- gm/constcolorprocessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gm/constcolorprocessor.cpp') diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp index 159bf0650a..cea7986cd3 100644 --- a/gm/constcolorprocessor.cpp +++ b/gm/constcolorprocessor.cpp @@ -25,7 +25,7 @@ namespace skiagm { class ConstColorProcessor : public GM { public: ConstColorProcessor() { - this->setBGColor(0xFFDDDDDD); + this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); } protected: @@ -124,6 +124,7 @@ protected: // Draw labels for the input to the processor and the processor to the right of // the test rect. The input label appears above the processor label. SkPaint labelPaint; + sk_tool_utils::set_portable_typeface_always(&labelPaint); labelPaint.setAntiAlias(true); labelPaint.setTextSize(10.f); SkString inputLabel; -- cgit v1.2.3