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

Unified Diff: src/utils/SkPictureUtils.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up 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
Index: src/utils/SkPictureUtils.cpp
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 85d523f46c566f7873b656e809d5d22725230579..4f4d2bf30a9294be4211a1c9dbb54c4eef29c02b 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -196,16 +196,16 @@ SkData* SkPictureUtils::GatherPixelRefs(const SkPicture* pict, const SkRect& are
}
// this test also handles if either area or pict's width/height are empty
- if (!SkRect::Intersects(area,
- SkRect::MakeWH(SkIntToScalar(pict->width()),
- SkIntToScalar(pict->height())))) {
+ if (!SkRect::Intersects(area, pict->cullRect())) {
return NULL;
}
SkTDArray<SkPixelRef*> array;
PixelRefSet prset(&array);
- GatherPixelRefDevice device(pict->width(), pict->height(), &prset);
+ GatherPixelRefDevice device(SkScalarCeilToInt(pict->cullRect().width()),
+ SkScalarCeilToInt(pict->cullRect().height()),
+ &prset);
SkNoSaveLayerCanvas canvas(&device);
canvas.clipRect(area, SkRegion::kIntersect_Op, false);

Powered by Google App Engine
This is Rietveld 408576698