diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-11 08:21:39 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-11 08:21:39 +0000 |
commit | 9678fe8ee0813f428a1d9b6ff8f3e14eb5c4c289 (patch) | |
tree | 5faa8c24502c6d05c226e8ba9d45092c9614d16f /cc/resources | |
parent | f737b5410c72c3c5e39d16a853e4231a1c52f347 (diff) | |
download | chromium_src-9678fe8ee0813f428a1d9b6ff8f3e14eb5c4c289.zip chromium_src-9678fe8ee0813f428a1d9b6ff8f3e14eb5c4c289.tar.gz chromium_src-9678fe8ee0813f428a1d9b6ff8f3e14eb5c4c289.tar.bz2 |
cc: Don't cleanup the pending twin's low res tiling.
After drawing, we cull unused tilings on the active tree. If we cull
the tiling which is the low res tiling on the pending tree, and then
later do a pinch such that the active tree wants a tiling of that scale
again, it would create the tiling which is already on the pending tree
and cause a bad state.
Adds a unit test that was hitting the CHECK() in PictureLayerImpl when
it changed the scale of the active layer to 1.f to match the pending
layer after drawing. Now it verifies that the active layer keeps the
pending low res tiling.
R=enne
BUG=358350
Review URL: https://codereview.chromium.org/323193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources')
-rw-r--r-- | cc/resources/picture_layer_tiling_set.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc index d292d83..9967868 100644 --- a/cc/resources/picture_layer_tiling_set.cc +++ b/cc/resources/picture_layer_tiling_set.cc @@ -109,12 +109,8 @@ void PictureLayerTilingSet::SetCanUseLCDText(bool can_use_lcd_text) { } PictureLayerTiling* PictureLayerTilingSet::AddTiling(float contents_scale) { - for (size_t i = 0; i < tilings_.size(); ++i) { - // TODO(enne): temporary sanity CHECK for http://crbug.com/358350. - // If a duplicate tiling gets added, then many assumptions in - // PictureLayerImpl fail. - CHECK_NE(tilings_[i]->contents_scale(), contents_scale); - } + for (size_t i = 0; i < tilings_.size(); ++i) + DCHECK_NE(tilings_[i]->contents_scale(), contents_scale); tilings_.push_back(PictureLayerTiling::Create(contents_scale, layer_bounds_, |