diff options
author | 2015-07-14 10:54:12 -0700 | |
---|---|---|
committer | 2015-07-14 10:54:12 -0700 | |
commit | a5517e2b190a8083b38964972b031c13e99f1012 (patch) | |
tree | 16fc3439de41b3af1e85c360904e96c44a2b8078 /src/utils/debugger/SkDrawCommand.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 'src/utils/debugger/SkDrawCommand.cpp')
-rw-r--r-- | src/utils/debugger/SkDrawCommand.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp index 7e2af084f2..5f0f74ffc0 100644 --- a/src/utils/debugger/SkDrawCommand.cpp +++ b/src/utils/debugger/SkDrawCommand.cpp @@ -320,7 +320,7 @@ bool SkDrawBitmapNineCommand::render(SkCanvas* canvas) const { SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint* paint, - SkCanvas::DrawBitmapRectFlags flags) + SkCanvas::SrcRectConstraint constraint) : INHERITED(kDrawBitmapRect_OpType) { fBitmap = bitmap; if (src) { @@ -336,7 +336,7 @@ SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const S } else { fPaintPtr = NULL; } - fFlags = flags; + fConstraint = constraint; fInfo.push(SkObjectParser::BitmapToString(bitmap)); if (src) { @@ -346,11 +346,11 @@ SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const S if (paint) { fInfo.push(SkObjectParser::PaintToString(*paint)); } - fInfo.push(SkObjectParser::IntToString(fFlags, "Flags: ")); + fInfo.push(SkObjectParser::IntToString(fConstraint, "Constraint: ")); } void SkDrawBitmapRectCommand::execute(SkCanvas* canvas) const { - canvas->drawBitmapRectToRect(fBitmap, this->srcRect(), fDst, fPaintPtr, fFlags); + canvas->drawBitmapRect(fBitmap, this->srcRect(), fDst, fPaintPtr, fConstraint); } bool SkDrawBitmapRectCommand::render(SkCanvas* canvas) const { |