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

Unified Diff: gm/dstreadshuffle.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/discard.cpp ('k') | gm/fatpathfill.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dstreadshuffle.cpp
diff --git a/gm/dstreadshuffle.cpp b/gm/dstreadshuffle.cpp
index 756e922ea9cc55ef2cbf01ff7c06a13eb010fd62..8cdccbc8f855263c4259f543abe7492fd9c70de8 100644
--- a/gm/dstreadshuffle.cpp
+++ b/gm/dstreadshuffle.cpp
@@ -87,6 +87,7 @@ protected:
case kText_ShapeType: {
const char* text = "Hello!";
paint->setTextSize(30);
+ sk_tool_utils::set_portable_typeface(paint);
canvas->drawText(text, strlen(text), 0, 0, *paint);
}
default:
@@ -96,12 +97,12 @@ protected:
static SkColor GetColor(SkRandom* random, int i, int nextColor) {
static SkColor colors[] = { SK_ColorRED,
- 0xFFFF7F00, // Orange
+ sk_tool_utils::color_to_565(0xFFFF7F00), // Orange
SK_ColorYELLOW,
SK_ColorGREEN,
SK_ColorBLUE,
- 0xFF4B0082, // indigo
- 0xFF7F00FF }; // violet
+ sk_tool_utils::color_to_565(0xFF4B0082), // indigo
+ sk_tool_utils::color_to_565(0xFF7F00FF) }; // violet
SkColor color;
int index = nextColor % SK_ARRAY_COUNT(colors);
switch (i) {
« no previous file with comments | « gm/discard.cpp ('k') | gm/fatpathfill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698