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

Unified Diff: cc/picture_layer_impl.cc

Issue 11678003: cc: Fix low-res impl-side painting artifacts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on latest patch Created 7 years, 11 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: cc/picture_layer_impl.cc
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index 161fd83cc54471c0a627b2479b5912ace15cac79..e4c113a5aac5e9ce34d91998d77664cbe8e5b43d 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -169,6 +169,9 @@ void PictureLayerImpl::calculateContentsScale(
return;
}
+ float min_contents_scale = layerTreeImpl()->settings().minimumContentsScale;
+ ideal_contents_scale = std::max(ideal_contents_scale, min_contents_scale);
+
ManageTilings(ideal_contents_scale);
// The content scale and bounds for a PictureLayerImpl is somewhat fictitious.
@@ -177,7 +180,7 @@ void PictureLayerImpl::calculateContentsScale(
// In order to guarantee that we can fill this integer space with any set of
// tilings (and then map back to floating point texture coordinates), the
// contents scale must be at least as large as the largest of the tilings.
- float max_contents_scale = 1.f;
+ float max_contents_scale = min_contents_scale;
danakj 2013/01/07 20:24:02 ah, i see, cool
for (size_t i = 0; i < tilings_.num_tilings(); ++i) {
const PictureLayerTiling* tiling = tilings_.tiling_at(i);
max_contents_scale = std::max(max_contents_scale, tiling->contents_scale());
@@ -251,6 +254,9 @@ ResourceProvider::ResourceId PictureLayerImpl::contentsResourceId() const {
}
void PictureLayerImpl::AddTiling(float contents_scale, gfx::Size tile_size) {
+ if (contents_scale < layerTreeImpl()->settings().minimumContentsScale)
danakj 2013/01/07 20:24:02 should this be a dcheck? (having trouble seeing wh
+ return;
+
const PictureLayerTiling* tiling = tilings_.AddTiling(
contents_scale,
tile_size);
« cc/layer_tree_settings.cc ('K') | « cc/picture_layer.cc ('k') | cc/picture_pile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698