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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2295343005: Improve PictureLayerTiling::CoverageIterator to handle rounding more precisely (Closed)
Patch Set: remove the 1.5 Created 4 years, 3 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 | « cc/base/tiling_data.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 06fa0a1ae6d68174bda946ee4ebb6598a2fa512e..4bb23b6d8da1610ed3efb702e757ec1efb30e1fb 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -830,9 +830,11 @@ void PictureLayerImpl::GetContentsResourceId(ResourceId* resource_id,
bounds() == raster_source_->GetSize())
<< " bounds " << bounds().ToString() << " pile "
<< raster_source_->GetSize().ToString();
- gfx::Rect content_rect(bounds());
+ float dest_scale = MaximumTilingContentsScale();
+ gfx::Rect content_rect =
+ gfx::ScaleToEnclosingRect(gfx::Rect(bounds()), dest_scale);
PictureLayerTilingSet::CoverageIterator iter(
- tilings_.get(), 1.f, content_rect, ideal_contents_scale_);
+ tilings_.get(), dest_scale, content_rect, ideal_contents_scale_);
// Mask resource not ready yet.
if (!iter || !*iter) {
« no previous file with comments | « cc/base/tiling_data.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698