drawBitmap is deprecated
Bug: skia:11216
Change-Id: I4affb8e00ff7e7b3e8d873ddfd653f397ca8d928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360979
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/docs/examples/blurbug.cpp b/docs/examples/blurbug.cpp
index 4babf82..6d26f09 100644
--- a/docs/examples/blurbug.cpp
+++ b/docs/examples/blurbug.cpp
@@ -17,7 +17,9 @@
paint.setMaskFilter(SkMaskFilter::MakeBlur(kSolid_SkBlurStyle, 3));
for (auto color : {SK_ColorRED, SK_ColorBLUE, 0xFF007F00}) {
paint.setColor(color);
- canvas->drawBitmapRect(bitmap, SkRect::MakeWH(8, 8), SkRect::MakeWH(32, 32), &paint);
+ canvas->drawImageRect(bitmap.asImage(), SkRect::MakeWH(8, 8), SkRect::MakeWH(32, 32),
+ SkSamplingOptions(), &paint,
+ SkCanvas::kStrict_SrcRectConstraint);
canvas->translate(48, 0);
}
}