aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/internal_links.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-06-15 05:09:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-15 05:09:59 -0700
commitbe7f768a357aefb39c42d24b81b24d647bb6ab70 (patch)
treea5897bcb5ce6dc995cf0cfea5e72a989cc2d16a1 /gm/internal_links.cpp
parentb5b50a07abb454abaf6ab46db20c6db6f5ecf9f6 (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/internal_links.cpp')
-rw-r--r--gm/internal_links.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gm/internal_links.cpp b/gm/internal_links.cpp
index 3ba3052c6a..e422868ebc 100644
--- a/gm/internal_links.cpp
+++ b/gm/internal_links.cpp
@@ -20,7 +20,7 @@ namespace skiagm {
class InternalLinksGM : public GM {
public:
InternalLinksGM() {
- this->setBGColor(0xFFDDDDDD);
+ this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
}
protected:
@@ -61,7 +61,7 @@ private:
canvas->drawRect(rect, paint);
paint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&paint);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setTextSize(SkIntToScalar(25));
paint.setColor(SK_ColorBLACK);
canvas->drawText(text, strlen(text), x, y, paint);