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 /gm/pictureshader.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 'gm/pictureshader.cpp')
-rw-r--r-- | gm/pictureshader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gm/pictureshader.cpp b/gm/pictureshader.cpp index 0b0a99e026..152cdf37a4 100644 --- a/gm/pictureshader.cpp +++ b/gm/pictureshader.cpp @@ -30,14 +30,12 @@ public: // Build the picture. SkPictureRecorder recorder; - SkCanvas* pictureCanvas = recorder.beginRecording(SkScalarRoundToInt(tileSize), - SkScalarRoundToInt(tileSize), - NULL, 0); + SkCanvas* pictureCanvas = recorder.beginRecording(tileSize, tileSize, NULL, 0); this->drawTile(pictureCanvas); fPicture.reset(recorder.endRecording()); // Build a reference bitmap. - fBitmap.allocN32Pixels(SkScalarRoundToInt(tileSize), SkScalarRoundToInt(tileSize)); + fBitmap.allocN32Pixels(SkScalarCeilToInt(tileSize), SkScalarCeilToInt(tileSize)); fBitmap.eraseColor(SK_ColorTRANSPARENT); SkCanvas bitmapCanvas(fBitmap); this->drawTile(&bitmapCanvas); |