drawBitmap is deprecated, use drawImage
Change-Id: Ib66517fe26036704ccb8328ef92fa0f5240c79f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358222
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/gm/copy_to_4444.cpp b/gm/copy_to_4444.cpp
index ff9a73b..aaa7349 100644
--- a/gm/copy_to_4444.cpp
+++ b/gm/copy_to_4444.cpp
@@ -54,9 +54,9 @@
bitmap.allocPixels(imageInfo);
SkCanvas offscreen(bitmap);
offscreen.clear(SK_ColorRED);
- canvas->drawBitmap(bitmap, 0, 0);
+ canvas->drawImage(bitmap.asImage(), 0, 0);
offscreen.clear(SK_ColorBLUE);
- canvas->drawBitmap(bitmap, 1, 1);
+ canvas->drawImage(bitmap.asImage(), 1, 1);
auto pack4444 = [](unsigned a, unsigned r, unsigned g, unsigned b) -> uint16_t {
return (a << 0) | (b << 4) | (g << 8) | (r << 12);
};
@@ -64,10 +64,10 @@
uint16_t blue4444 = pack4444(0xF, 0x0, 0x0, 0x0F);
SkPixmap redPixmap(imageInfo, &red4444, 2);
if (bitmap.writePixels(redPixmap, 0, 0)) {
- canvas->drawBitmap(bitmap, 2, 2);
+ canvas->drawImage(bitmap.asImage(), 2, 2);
}
SkPixmap bluePixmap(imageInfo, &blue4444, 2);
if (bitmap.writePixels(bluePixmap, 0, 0)) {
- canvas->drawBitmap(bitmap, 3, 3);
+ canvas->drawImage(bitmap.asImage(), 3, 3);
}
}