Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: gm/quadpaths.cpp

Issue 1234233003: make gradtext quadpaths gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/gradtext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/quadpaths.cpp
diff --git a/gm/quadpaths.cpp b/gm/quadpaths.cpp
index d5eb6463137fc44aacd0ec19b8a1952c7011f832..5e4b7a43a78c069250095d33e4721d79f8d9e29c 100644
--- a/gm/quadpaths.cpp
+++ b/gm/quadpaths.cpp
@@ -83,8 +83,7 @@ protected:
SkPaint titlePaint;
titlePaint.setColor(SK_ColorBLACK);
titlePaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&titlePaint);
- titlePaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&titlePaint);
titlePaint.setTextSize(15 * SK_Scalar1);
const char title[] = "Quad Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -113,7 +112,7 @@ protected:
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
- SkColor color = 0xff007000;
+ SkColor color = sk_tool_utils::color_to_565(0xff007000);
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
@@ -128,8 +127,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(10 * SK_Scalar1);
canvas->drawText(gStyles[style].fName,
strlen(gStyles[style].fName),
@@ -229,8 +227,7 @@ protected:
SkPaint titlePaint;
titlePaint.setColor(SK_ColorBLACK);
titlePaint.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&titlePaint);
- titlePaint.setLCDRenderText(true);
+ sk_tool_utils::set_portable_typeface_always(&titlePaint);
titlePaint.setTextSize(15 * SK_Scalar1);
const char title[] = "Quad Closed Drawn Into Rectangle Clips With "
"Indicated Style, Fill and Linecaps, with stroke width 10";
@@ -259,7 +256,7 @@ protected:
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
- SkColor color = 0xff007000;
+ SkColor color = sk_tool_utils::color_to_565(0xff007000);
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
@@ -274,8 +271,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(10 * SK_Scalar1);
canvas->drawText(gStyles[style].fName,
strlen(gStyles[style].fName),
« no previous file with comments | « gm/gradtext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698