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

Unified Diff: gm/xfermodes.cpp

Issue 1243103002: make xfermode* 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/xfermodeimagefilter.cpp ('k') | gm/xfermodes2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes.cpp
diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp
index 066ad5b695f833faacb88641906e3aeae72c96ce..93c8bf212ce2211453a4eb7bc5459de956c48528 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -26,7 +26,7 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst,
{
SkCanvas c(*src);
- p.setColor(0xFFFFCC44);
+ p.setColor(sk_tool_utils::color_to_565(0xFFFFCC44));
r.set(0, 0, ww*3/4, hh*3/4);
c.drawOval(r, p);
}
@@ -36,7 +36,7 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst,
{
SkCanvas c(*dst);
- p.setColor(0xFF66AAFF);
+ p.setColor(sk_tool_utils::color_to_565(0xFF66AAFF));
r.set(ww/3, hh/3, ww*19/20, hh*19/20);
c.drawRect(r, p);
}
@@ -106,11 +106,11 @@ class XfermodesGM : public GM {
case kQuarterClear_SrcType: {
SkScalar halfW = SkIntToScalar(W) / 2;
SkScalar halfH = SkIntToScalar(H) / 2;
- p.setColor(0xFF66AAFF);
+ p.setColor(sk_tool_utils::color_to_565(0xFF66AAFF));
SkRect r = SkRect::MakeXYWH(x + halfW, y, halfW,
SkIntToScalar(H));
canvas->drawRect(r, p);
- p.setColor(0xFFAA66FF);
+ p.setColor(sk_tool_utils::color_to_565(0xFFAA66FF));
r = SkRect::MakeXYWH(x, y + halfH, SkIntToScalar(W), halfH);
canvas->drawRect(r, p);
break;
@@ -129,7 +129,7 @@ class XfermodesGM : public GM {
SkScalar h = SkIntToScalar(H);
SkRect r = SkRect::MakeXYWH(x + w / 3, y + h / 3,
w * 37 / 60, h * 37 / 60);
- p.setColor(0xFF66AAFF);
+ p.setColor(sk_tool_utils::color_to_565(0xFF66AAFF));
canvas->drawRect(r, p);
break;
}
@@ -232,7 +232,7 @@ protected:
SkPaint labelP;
labelP.setAntiAlias(true);
- sk_tool_utils::set_portable_typeface(&labelP);
+ sk_tool_utils::set_portable_typeface_always(&labelP);
labelP.setTextAlign(SkPaint::kCenter_Align);
const int W = 5;
« no previous file with comments | « gm/xfermodeimagefilter.cpp ('k') | gm/xfermodes2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698