aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/emptypath.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-06-12 11:49:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-12 11:49:04 -0700
commitd85093c28fe360650c46971b00a39c6dbf991a6b (patch)
tree5055cc609122b43052adc27adb2ee10305c2e9d0 /gm/emptypath.cpp
parent1866b571f18f1ac326e2e8765d79511ecf58164d (diff)
make emptypath portable; add 565 color utility
R=djsollen@google.com Review URL: https://codereview.chromium.org/1182833004
Diffstat (limited to 'gm/emptypath.cpp')
-rw-r--r--gm/emptypath.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/emptypath.cpp b/gm/emptypath.cpp
index 3b6fe8108f..219b9432d3 100644
--- a/gm/emptypath.cpp
+++ b/gm/emptypath.cpp
@@ -63,7 +63,7 @@ protected:
SkPaint titlePaint;
titlePaint.setColor(SK_ColorBLACK);
titlePaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&titlePaint);
+ sk_tool_utils::set_portable_typeface_always(&titlePaint);
titlePaint.setLCDRenderText(true);
titlePaint.setTextSize(15 * SK_Scalar1);
const char title[] = "Empty Paths Drawn Into Rectangle Clips With "
@@ -92,7 +92,8 @@ protected:
SkColor color = rand.nextU();
- color = 0xff000000| color; // force solid
+ color = 0xff000000 | color; // force solid
+ sk_tool_utils::color_to_565(&color);
this->drawEmpty(canvas, color, rect,
gStyles[style].fStyle, gFills[fill].fFill);
@@ -106,8 +107,7 @@ protected:
SkPaint labelPaint;
labelPaint.setColor(color);
labelPaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&labelPaint);
- labelPaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&labelPaint);
labelPaint.setTextSize(12 * SK_Scalar1);
canvas->drawText(gStyles[style].fName,
strlen(gStyles[style].fName),