Hide misc non-sampling draw methods
Related chrome CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2646604
Bug: skia:7650
Change-Id: I1069a6151cb70bb6d2c743cf2513f47284c9df7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358221
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Mike Reed <reed@google.com>
diff --git a/gm/drawatlas.cpp b/gm/drawatlas.cpp
index 06ab3d6..5ac2be2 100644
--- a/gm/drawatlas.cpp
+++ b/gm/drawatlas.cpp
@@ -113,12 +113,14 @@
}
SkPaint paint;
- paint.setFilterQuality(kLow_SkFilterQuality);
paint.setAntiAlias(true);
+ SkSamplingOptions sampling(SkFilterMode::kLinear);
- canvas->drawAtlas(atlas.get(), xform, tex, N, nullptr, &paint);
+ canvas->drawAtlas(atlas.get(), xform, tex, nullptr, N, SkBlendMode::kDst,
+ sampling, nullptr, &paint);
canvas->translate(0, 100);
- canvas->drawAtlas(atlas.get(), xform, tex, colors, N, SkBlendMode::kSrcIn, nullptr, &paint);
+ canvas->drawAtlas(atlas.get(), xform, tex, colors, N, SkBlendMode::kSrcIn,
+ sampling, nullptr, &paint);
}
private:
@@ -342,7 +344,8 @@
canvas->save();
for (const sk_sp<SkColorFilter>& cf : filters) {
paint.setColorFilter(cf);
- canvas->drawAtlas(image, &xform, &tex, &color, 1, mode, &tex, &paint);
+ canvas->drawAtlas(image.get(), &xform, &tex, &color, 1, mode,
+ SkSamplingOptions(), &tex, &paint);
canvas->translate(128, 0);
paint.setShader(image->makeShader(SkSamplingOptions()));
canvas->drawVertices(verts, mode, paint);