diff options
author | reed <reed@google.com> | 2015-07-14 10:54:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 10:54:12 -0700 |
commit | a5517e2b190a8083b38964972b031c13e99f1012 (patch) | |
tree | 16fc3439de41b3af1e85c360904e96c44a2b8078 /gm/bitmaprect.cpp | |
parent | 4abc186d029c3c57a53cec3f483de2fff6d4a954 (diff) |
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
Diffstat (limited to 'gm/bitmaprect.cpp')
-rw-r--r-- | gm/bitmaprect.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp index aa71f48eb0..ff52c15e5d 100644 --- a/gm/bitmaprect.cpp +++ b/gm/bitmaprect.cpp @@ -70,7 +70,8 @@ protected: 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 @@ static void make_3x3_bitmap(SkBitmap* bitmap) { } } -// 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.: // __|____|__ |