Migrate to drawImage w/ sampling
Bug: skia:7650
Change-Id: Icb99ee9f7142fe1ca22f9fa66b1467486ce576a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/samplecode/SampleMixer.cpp b/samplecode/SampleMixer.cpp
index aa6d831..aa164b4 100644
--- a/samplecode/SampleMixer.cpp
+++ b/samplecode/SampleMixer.cpp
@@ -40,13 +40,14 @@
void dodraw(SkCanvas* canvas, sk_sp<SkColorFilter> cf0, sk_sp<SkColorFilter> cf1, float gap) {
SkPaint paint;
paint.setColorFilter(cf0);
- canvas->drawImage(fImg, 0, 0, &paint);
+ canvas->drawImage(fImg, 0, 0, SkSamplingOptions(), &paint);
paint.setColorFilter(SkColorFilters::Lerp(fWeight, cf0, cf1));
- canvas->drawImage(fImg, fImg->width() + gap * fWeight, 0, &paint);
+ canvas->drawImage(fImg, fImg->width() + gap * fWeight, 0,
+ SkSamplingOptions(), &paint);
paint.setColorFilter(cf1);
- canvas->drawImage(fImg, 2*fImg->width() + gap, 0, &paint);
+ canvas->drawImage(fImg, 2*fImg->width() + gap, 0, SkSamplingOptions(), &paint);
}
void onDrawContent(SkCanvas* canvas) override {