diff options
author | robertphillips <robertphillips@google.com> | 2014-08-29 08:03:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-29 08:03:56 -0700 |
commit | a8d7f0b13cd4c6d773fcf055fe17db75d260fa05 (patch) | |
tree | 37e85b212ccd5761b9a736282e75ebf838840798 /src/utils/debugger/SkDrawCommand.cpp | |
parent | 77d724c07878b21602e96e095f6a446c429a079a (diff) |
Try out scalar picture sizes
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.
R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/513983002
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 3b1a028d80..3a073962cc 100644 --- a/src/utils/debugger/SkDrawCommand.cpp +++ b/src/utils/debugger/SkDrawCommand.cpp @@ -523,7 +523,9 @@ SkDrawPictureCommand::SkDrawPictureCommand(const SkPicture* picture, } SkString* temp = new SkString; - temp->appendf("SkPicture: W: %d H: %d", picture->width(), picture->height()); + temp->appendf("SkPicture: L: %f T: %f R: %f B: %f", + picture->cullRect().fLeft, picture->cullRect().fTop, + picture->cullRect().fRight, picture->cullRect().fBottom); fInfo.push(temp); if (NULL != matrix) { fInfo.push(SkObjectParser::MatrixToString(*matrix)); @@ -541,9 +543,7 @@ bool SkDrawPictureCommand::render(SkCanvas* canvas) const { canvas->clear(0xFFFFFFFF); canvas->save(); - SkRect bounds = SkRect::MakeWH(SkIntToScalar(fPicture->width()), - SkIntToScalar(fPicture->height())); - xlate_and_scale_to_bounds(canvas, bounds); + xlate_and_scale_to_bounds(canvas, fPicture->cullRect()); canvas->drawPicture(fPicture.get()); |