add src-rect-constraint to drawImageRect
Follow-on work
- unify around SrcRectConstraint (i.e. drawBitmapRect)
- remove silly drawBitmapRectToRect alias
- clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter
BUG=skia:
Review URL: https://codereview.chromium.org/1228083004
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index aa71f48..ff52c15 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -70,7 +70,8 @@
canvas->drawBitmap(bitmap, 0, 0, &paint);
if (!fUseIRect) {
- canvas->drawBitmapRectToRect(bitmap, &srcR, dstR, &paint);
+ canvas->drawBitmapRect(bitmap, &srcR, dstR, &paint,
+ SkCanvas::kStrict_SrcRectConstraint);
} else {
canvas->drawBitmapRect(bitmap, &src[i], dstR, &paint);
}
@@ -110,7 +111,7 @@
}
}
-// This GM attempts to make visible any issues drawBitmapRectToRect may have
+// This GM attempts to make visible any issues drawBitmapRect may have
// with partial source rects. In this case the eight pixels on the border
// should be half the width/height of the central pixel, i.e.:
// __|____|__