Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: src/utils/SkGatherPixelRefsAndRects.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkPictureUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkGatherPixelRefsAndRects.cpp
diff --git a/src/utils/SkGatherPixelRefsAndRects.cpp b/src/utils/SkGatherPixelRefsAndRects.cpp
index f46fe8ed42f0d01a069f8d97abde26f379f0844c..ee5b1472fcaa196aacbcbb2811039395d753a038 100644
--- a/src/utils/SkGatherPixelRefsAndRects.cpp
+++ b/src/utils/SkGatherPixelRefsAndRects.cpp
@@ -11,15 +11,15 @@
void SkPictureUtils::GatherPixelRefsAndRects(SkPicture* pict,
SkPictureUtils::SkPixelRefContainer* prCont) {
- if (0 == pict->width() || 0 == pict->height()) {
+ if (pict->cullRect().isEmpty()) {
return ;
}
- SkGatherPixelRefsAndRectsDevice device(pict->width(), pict->height(), prCont);
+ SkGatherPixelRefsAndRectsDevice device(SkScalarCeilToInt(pict->cullRect().width()),
+ SkScalarCeilToInt(pict->cullRect().height()),
+ prCont);
SkNoSaveLayerCanvas canvas(&device);
- canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()),
- SkIntToScalar(pict->height())),
- SkRegion::kIntersect_Op, false);
+ canvas.clipRect(pict->cullRect(), SkRegion::kIntersect_Op, false);
canvas.drawPicture(pict);
}
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698