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 /src/core/SkMiniRecorder.h | |
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 'src/core/SkMiniRecorder.h')
-rw-r--r-- | src/core/SkMiniRecorder.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkMiniRecorder.h b/src/core/SkMiniRecorder.h index 023e2ad55a..5b68fc22f8 100644 --- a/src/core/SkMiniRecorder.h +++ b/src/core/SkMiniRecorder.h @@ -20,8 +20,8 @@ public: ~SkMiniRecorder(); // Try to record an op. Returns false on failure. - bool drawBitmapRectToRect(const SkBitmap&, const SkRect* src, const SkRect& dst, - const SkPaint*, SkCanvas::DrawBitmapRectFlags); + bool drawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, + const SkPaint*, SkCanvas::SrcRectConstraint); bool drawPath(const SkPath&, const SkPaint&); bool drawRect(const SkRect&, const SkPaint&); bool drawTextBlob(const SkTextBlob*, SkScalar x, SkScalar y, const SkPaint&); @@ -38,7 +38,7 @@ public: private: enum class State { kEmpty, - kDrawBitmapRectToRectFixedSize, + kDrawBitmapRectFixedSize, kDrawPath, kDrawRect, kDrawTextBlob, @@ -50,7 +50,7 @@ private: struct Max { static const size_t val = A > B ? A : B; }; static const size_t kInlineStorage = - Max<sizeof(SkRecords::DrawBitmapRectToRectFixedSize), + Max<sizeof(SkRecords::DrawBitmapRectFixedSize), Max<sizeof(SkRecords::DrawPath), Max<sizeof(SkRecords::DrawRect), sizeof(SkRecords::DrawTextBlob)>::val>::val>::val; |