Pass sampling to surface.draw
Bug: skia:7650
Change-Id: I97941a44faa4176f94d57a9c1626ac36b0c0c4ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350557
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/docs/examples/Surface_MakeRenderTarget_2.cpp b/docs/examples/Surface_MakeRenderTarget_2.cpp
index ff8046d..f610d94 100644
--- a/docs/examples/Surface_MakeRenderTarget_2.cpp
+++ b/docs/examples/Surface_MakeRenderTarget_2.cpp
@@ -27,7 +27,7 @@
? SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0, &props)
: SkSurface::MakeRaster(info, &props);
test_draw(surface->getCanvas());
- surface->draw(canvas, 0, y, nullptr);
+ surface->draw(canvas, 0, y);
sk_sp<SkImage> image(surface->makeImageSnapshot());
SkAutoCanvasRestore acr(canvas, true);
canvas->scale(8, 8);
diff --git a/docs/examples/Surface_draw.cpp b/docs/examples/Surface_draw.cpp
index d4e9d71..4808836 100644
--- a/docs/examples/Surface_draw.cpp
+++ b/docs/examples/Surface_draw.cpp
@@ -8,7 +8,7 @@
sk_sp<SkSurface> lil(big->makeSurface(SkImageInfo::MakeN32(32, 32, kPremul_SkAlphaType)));
big->getCanvas()->clear(SK_ColorRED);
lil->getCanvas()->clear(SK_ColorBLACK);
- lil->draw(big->getCanvas(), 16, 16, nullptr);
+ lil->draw(big->getCanvas(), 16, 16);
SkPixmap pixmap;
if (big->peekPixels(&pixmap)) {
SkBitmap bigBits;
diff --git a/docs/examples/Surface_makeImageSnapshot.cpp b/docs/examples/Surface_makeImageSnapshot.cpp
index 9d40184..1b60a30 100644
--- a/docs/examples/Surface_makeImageSnapshot.cpp
+++ b/docs/examples/Surface_makeImageSnapshot.cpp
@@ -9,7 +9,7 @@
big->getCanvas()->clear(SK_ColorRED);
lil->getCanvas()->clear(SK_ColorBLACK);
sk_sp<SkImage> early(big->makeImageSnapshot());
- lil->draw(big->getCanvas(), 16, 16, nullptr);
+ lil->draw(big->getCanvas(), 16, 16);
sk_sp<SkImage> later(big->makeImageSnapshot());
canvas->drawImage(early, 0, 0);
canvas->drawImage(later, 128, 0);
diff --git a/docs/examples/Surface_makeImageSnapshot_2.cpp b/docs/examples/Surface_makeImageSnapshot_2.cpp
index 225d0be..80c5580 100644
--- a/docs/examples/Surface_makeImageSnapshot_2.cpp
+++ b/docs/examples/Surface_makeImageSnapshot_2.cpp
@@ -9,7 +9,7 @@
big->getCanvas()->clear(SK_ColorRED);
lil->getCanvas()->clear(SK_ColorBLACK);
sk_sp<SkImage> early(big->makeImageSnapshot());
- lil->draw(big->getCanvas(), 16, 16, nullptr);
+ lil->draw(big->getCanvas(), 16, 16);
sk_sp<SkImage> later(big->makeImageSnapshot({0, 0, 16, 16}));
canvas->drawImage(early, 0, 0);
canvas->drawImage(later, 0, 0);
diff --git a/docs/examples/blur4444.cpp b/docs/examples/blur4444.cpp
index 873c97ef..0d24c90 100644
--- a/docs/examples/blur4444.cpp
+++ b/docs/examples/blur4444.cpp
@@ -57,6 +57,6 @@
SkPaint postPaint;
postPaint.setDither(postDither);
- surf->draw(canvas, 0, 0, &postPaint);
+ surf->draw(canvas, 0, 0, SkSamplingOptions(), &postPaint);
}
} // END FIDDLE