From a8d7f0b13cd4c6d773fcf055fe17db75d260fa05 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Fri, 29 Aug 2014 08:03:56 -0700 Subject: 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 --- gm/pictureshader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gm/pictureshader.cpp') 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); -- cgit v1.2.3