More hiding of legacy drawImage calls
Also cleanup some of the duplicate code in SkRecords
Bug: skia:7650
Change-Id: I4d3167a892c126c19a54002beab25c9a6c96fa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357000
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/samplecode/SampleTiming.cpp b/samplecode/SampleTiming.cpp
index e4c9ad1..4dce6d1 100644
--- a/samplecode/SampleTiming.cpp
+++ b/samplecode/SampleTiming.cpp
@@ -40,9 +40,10 @@
for (int y = 0; y < H; y++)
for (int x = 0; x < W; x++) {
auto start = std::chrono::steady_clock::now();
- canvas->drawImageRect(fImg, SkRect::MakeXYWH(x,y,1,1)
- , SkRect::MakeXYWH(x,y,1,1)
- , /*paint=*/nullptr);
+ canvas->drawImageRect(fImg.get(),
+ SkRect::MakeXYWH(x,y,1,1), SkRect::MakeXYWH(x,y,1,1),
+ SkSamplingOptions(), /*paint=*/nullptr,
+ SkCanvas::kStrict_SrcRectConstraint);
auto elapsed = std::chrono::steady_clock::now() - start;
cost[y][x] = elapsed.count();