Use SkTileMode instead of nested enum
Add guard to transition clients
Change-Id: Ia7a3e8f95722f91e84af262168dadf89a78707da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205720
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
diff --git a/gm/colorfilterimagefilter.cpp b/gm/colorfilterimagefilter.cpp
index e83d228..0559715 100644
--- a/gm/colorfilterimagefilter.cpp
+++ b/gm/colorfilterimagefilter.cpp
@@ -59,13 +59,13 @@
static sk_sp<SkShader> sh_make_lineargradient0() {
const SkPoint pts[] = { { 0, 0 }, { 100, 100 } };
const SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
- return SkGradientShader::MakeLinear(pts, colors, nullptr, 3, SkShader::kRepeat_TileMode);
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, 3, SkTileMode::kRepeat);
}
static sk_sp<SkShader> sh_make_lineargradient1() {
const SkPoint pts[] = { { 0, 0 }, { 100, 100 } };
const SkColor colors[] = { SK_ColorRED, 0x0000FF00, SK_ColorBLUE };
- return SkGradientShader::MakeLinear(pts, colors, nullptr, 3, SkShader::kRepeat_TileMode);
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, 3, SkTileMode::kRepeat);
}
static sk_sp<SkShader> sh_make_image() {
@@ -73,7 +73,7 @@
if (!image) {
return nullptr;
}
- return image->makeShader(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);
+ return image->makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat);
}
static void sk_gm_get_shaders(SkTDArray<SkShader*>* array) {
@@ -205,7 +205,7 @@
const SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
*shaders.append() = SkGradientShader::MakeTwoPointConical({0, 0}, 50, {0, 0}, 150,
colors, nullptr, 2,
- SkShader::kClamp_TileMode).release();
+ SkTileMode::kClamp).release();
SkPaint paint;
SkRect r = SkRect::MakeWH(120, 120);
@@ -228,11 +228,11 @@
}
template <typename Maker> void do_mixershader(SkCanvas* canvas, Maker&& maker) {
- auto shaderA = GetResourceAsImage("images/mandrill_128.png")->makeShader(SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode);
+ auto shaderA = GetResourceAsImage("images/mandrill_128.png")->makeShader(SkTileMode::kClamp,
+ SkTileMode::kClamp);
const SkColor colors[] = { SK_ColorGREEN, 0 };
auto shaderB = SkGradientShader::MakeRadial({60, 60}, 55, colors, nullptr, 2,
- SkShader::kClamp_TileMode,
+ SkTileMode::kClamp,
SkGradientShader::kInterpolateColorsInPremul_Flag,
nullptr);
const SkBlendMode modes[] = {