Begin to hide drawBitmap
... now that bitmap
- converts to image with just bitmap.asImage()
- canvas *always* converts bitmaps to images before they are drawn
Bug: skia:10037
Change-Id: I24292f62e0fd072b3b810d974d0fe5c6d9b9a68d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353582
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 7c99428..afe8615 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -8,6 +8,7 @@
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
+#include "include/core/SkImage.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
@@ -250,7 +251,7 @@
SkIRect srcR = { gWidth, 0, gWidth + 16, 16 };
SkRect dstR = { 0, 0, SkIntToScalar(16), SkIntToScalar(16) };
- canvas.drawBitmapRect(src, srcR, dstR, nullptr);
+ canvas.drawImageRect(src.asImage(), srcR, dstR, nullptr);
// ensure that we draw nothing if srcR does not intersect the bitmap
REPORTER_ASSERT(reporter, check_for_all_zeros(dst));