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

Unified Diff: gm/colorcube.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/bmpfilterqualityrepeat.cpp ('k') | gm/discard.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colorcube.cpp
diff --git a/gm/colorcube.cpp b/gm/colorcube.cpp
index 59463fcd9e424b8da4e0c7e2d8afbd1355a6edc4..931dcfaf51beda81516f5357115eddc1d6b10b10 100644
--- a/gm/colorcube.cpp
+++ b/gm/colorcube.cpp
@@ -85,10 +85,11 @@ protected:
for (int r = 0; r < size; ++r) {
for (int g = 0; g < size; ++g) {
for (int b = 0; b < size; ++b) {
- pixels[(size * ((size * b) + g)) + r] = SkColorSetARGB(0xFF,
+ pixels[(size * ((size * b) + g)) + r] = sk_tool_utils::color_to_565(
+ SkColorSetARGB(0xFF,
invR ? invLut[r] : lut[r],
invG ? invLut[g] : lut[g],
- invB ? invLut[b] : lut[b]);
+ invB ? invLut[b] : lut[b]));
}
}
}
« no previous file with comments | « gm/bmpfilterqualityrepeat.cpp ('k') | gm/discard.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698