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

Unified Diff: gm/pictureshader.cpp

Issue 1263553002: make pixelsnap textblob* etc gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add more 565 compatibility 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/pathinterior.cpp ('k') | gm/pixelsnap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pictureshader.cpp
diff --git a/gm/pictureshader.cpp b/gm/pictureshader.cpp
index 220649be1c5beda59f2769154e71af97d918310d..3f719be42da19d450bb6a1c930802aa8850a5aa4 100644
--- a/gm/pictureshader.cpp
+++ b/gm/pictureshader.cpp
@@ -143,7 +143,7 @@ private:
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(SK_ColorLTGRAY);
+ paint.setColor(sk_tool_utils::color_to_565(SK_ColorLTGRAY));
canvas->save();
canvas->concat(matrix);
@@ -193,9 +193,9 @@ DEF_SIMPLE_GM(tiled_picture_shader, canvas, 400, 400) {
SkRect r = tile;
r.inset(4, 4);
SkPaint p;
- p.setColor(0xFF303F9F); // dark blue
+ p.setColor(sk_tool_utils::color_to_565(0xFF303F9F)); // dark blue
c->drawRect(r, p);
- p.setColor(0xFFC5CAE9); // light blue
+ p.setColor(sk_tool_utils::color_to_565(0xFFC5CAE9)); // light blue
p.setStrokeWidth(10);
c->drawLine(20, 20, 80, 80, p);
@@ -207,11 +207,11 @@ DEF_SIMPLE_GM(tiled_picture_shader, canvas, 400, 400) {
NULL,
NULL));
- p.setColor(0xFF8BC34A); // green
+ p.setColor(sk_tool_utils::color_to_565(0xFF8BC34A)); // green
canvas->drawPaint(p);
canvas->clipRect(SkRect::MakeXYWH(0, 0, 400, 350));
- p.setColor(0xFFB6B6B6); // gray
+ p.setColor(sk_tool_utils::color_to_565(0xFFB6B6B6)); // gray
canvas->drawPaint(p);
p.setShader(shader.get());
« no previous file with comments | « gm/pathinterior.cpp ('k') | gm/pixelsnap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698