Add flag to hide non-sampling imageshader factories
Bug: skia:11056
Change-Id: Ic79876106c003f6061cbb50ad2f4a4bf4f446231
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341681
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/gm/bug6783.cpp b/gm/bug6783.cpp
index 4f52e09..7be10e7 100644
--- a/gm/bug6783.cpp
+++ b/gm/bug6783.cpp
@@ -47,10 +47,10 @@
SkMatrix m = SkMatrix::Translate(25, 214) * SkMatrix::Scale(2, 2);
m.preSkew(0.5f, 0.5f);
- // The bug was present at all filter levels, but you might not notice it at kNone.
- p.setFilterQuality(kLow_SkFilterQuality);
+ // The bug was present at all filter levels, but you might not notice it at nearest.
+ SkSamplingOptions sampling(SkFilterMode::kLinear, SkMipmapMode::kNone);
// It's only important to repeat or mirror in x to show off the bug.
- p.setShader(img->makeShader(SkTileMode::kRepeat, SkTileMode::kClamp, &m));
+ p.setShader(img->makeShader(SkTileMode::kRepeat, SkTileMode::kClamp, sampling, m));
canvas->drawPaint(p);
}