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

Unified Diff: gm/addarc.cpp

Issue 1262703002: make tests portable by using 565 compatible colors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dstreadshuffle text portable gm 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/aarectmodes.cpp ('k') | gm/bitmaprect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/addarc.cpp
diff --git a/gm/addarc.cpp b/gm/addarc.cpp
index 742f16fce5f6d41b67ace89a9f39caba8333b521..3bfed8d549dfccbf3bee485b50a5df7b72f45732 100644
--- a/gm/addarc.cpp
+++ b/gm/addarc.cpp
@@ -36,7 +36,7 @@ protected:
SkScalar sign = 1;
while (r.width() > paint.getStrokeWidth() * 3) {
- paint.setColor(rand.nextU() | (0xFF << 24));
+ paint.setColor(sk_tool_utils::color_to_565(rand.nextU() | (0xFF << 24)));
SkScalar startAngle = rand.nextUScalar1() * 360;
SkScalar speed = SkScalarSqrt(16 / r.width()) * 0.5f;
@@ -144,7 +144,7 @@ protected:
SkAutoCanvasRestore acr(canvas, true);
canvas->rotate(fRotate * sign);
- paint.setColor(rand.nextU() | (0xFF << 24));
+ paint.setColor(sk_tool_utils::color_to_565(rand.nextU() | (0xFF << 24)));
canvas->drawOval(r, paint);
r.inset(delta, delta);
sign = -sign;
« no previous file with comments | « gm/aarectmodes.cpp ('k') | gm/bitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698