Index: gm/color4f.cpp |
diff --git a/gm/color4f.cpp b/gm/color4f.cpp |
index e912654bc911fd1a95f40741b41e0b38bd129c4d..9e6fcf6060ed07b959b38adc2582fd2921c7d14d 100644 |
--- a/gm/color4f.cpp |
+++ b/gm/color4f.cpp |
@@ -45,10 +45,14 @@ static SkColorFilter* make_cf1() { |
return SkColorFilter::CreateComposeFilter(a, b); |
} |
+static SkColorFilter* make_cf2() { |
+ return SkColorFilter::CreateModeFilter(0x8044CC88, SkXfermode::kSrcATop_Mode); |
+} |
+ |
static void draw_into_canvas(SkCanvas* canvas) { |
- const SkRect r = SkRect::MakeWH(100, 100); |
+ const SkRect r = SkRect::MakeWH(50, 100); |
SkShader* (*shaders[])() { make_opaque_color, make_alpha_color }; |
- SkColorFilter* (*filters[])() { make_cf_null, make_cf0, make_cf1 }; |
+ SkColorFilter* (*filters[])() { make_cf_null, make_cf0, make_cf1, make_cf2 }; |
SkPaint paint; |
for (auto shProc : shaders) { |
@@ -56,13 +60,13 @@ static void draw_into_canvas(SkCanvas* canvas) { |
for (auto cfProc : filters) { |
SkSafeUnref(paint.setColorFilter(cfProc())); |
canvas->drawRect(r, paint); |
- canvas->translate(120, 0); |
+ canvas->translate(60, 0); |
} |
} |
} |
-DEF_SIMPLE_GM(color4f, canvas, 620, 260) { |
- canvas->translate(20, 20); |
+DEF_SIMPLE_GM(color4f, canvas, 1024, 260) { |
+ canvas->translate(10, 10); |
SkPaint bg; |
// need the target to be opaque, so we can draw it to the screen |
@@ -71,7 +75,7 @@ DEF_SIMPLE_GM(color4f, canvas, 620, 260) { |
SkColorProfileType const profiles[] { kLinear_SkColorProfileType, kSRGB_SkColorProfileType }; |
for (auto profile : profiles) { |
- const SkImageInfo info = SkImageInfo::Make(600, 100, kN32_SkColorType, kPremul_SkAlphaType, |
+ const SkImageInfo info = SkImageInfo::Make(1024, 100, kN32_SkColorType, kPremul_SkAlphaType, |
profile); |
SkAutoTUnref<SkSurface> surface(SkSurface::NewRaster(info)); |
surface->getCanvas()->drawPaint(bg); |