summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer_impl.cc
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 20:29:51 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 20:29:51 +0000
commit88514b4307cc9a40e163c8262bb4226dd1648449 (patch)
treed8856d5ae636caba21f4ba51c4173f5356746d7b /cc/layers/picture_layer_impl.cc
parent4107371c15f222de836fc4f2122af8a2a79402f0 (diff)
downloadchromium_src-88514b4307cc9a40e163c8262bb4226dd1648449.zip
chromium_src-88514b4307cc9a40e163c8262bb4226dd1648449.tar.gz
chromium_src-88514b4307cc9a40e163c8262bb4226dd1648449.tar.bz2
Revert of cc: Remove tilings from recycle tree when active tree removes them. (https://codereview.chromium.org/400633004/)
Reason for revert: Related crashes are showing up on Android bots. Details in bug. BUG=395398 Original issue's description: > cc: Remove tilings from recycle tree when active tree removes them. > > This patch is the second part of ensuring that recycle tree does not > contain any unshared tiles. > > This is done by removing recycle tree tilings when active tree removes > those tilings. > > BUG=393802 > R=danakj > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284311 TBR=danakj@chromium.org,vmpstr@chromium.org NOTREECHECKS=true NOTRY=true BUG=393802 Review URL: https://codereview.chromium.org/407763002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/picture_layer_impl.cc')
-rw-r--r--cc/layers/picture_layer_impl.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 8c0b771..4a7e0c0 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1195,28 +1195,18 @@ void PictureLayerImpl::CleanUpTilingsOnActiveLayer(
to_remove.push_back(tiling);
}
- if (to_remove.empty())
- return;
-
- PictureLayerImpl* recycled_twin = static_cast<PictureLayerImpl*>(
- layer_tree_impl()->FindRecycleTreeLayerById(id()));
- // Remove tilings on this tree and the twin tree.
for (size_t i = 0; i < to_remove.size(); ++i) {
const PictureLayerTiling* twin_tiling = GetTwinTiling(to_remove[i]);
// Only remove tilings from the twin layer if they have
// NON_IDEAL_RESOLUTION.
if (twin_tiling && twin_tiling->resolution() == NON_IDEAL_RESOLUTION)
twin->RemoveTiling(to_remove[i]->contents_scale());
- // Remove the tiling from the recycle tree. Note that we ignore resolution,
- // since we don't need to maintain high/low res on the recycle tree.
- if (recycled_twin)
- recycled_twin->RemoveTiling(to_remove[i]->contents_scale());
// TODO(enne): temporary sanity CHECK for http://crbug.com/358350
CHECK_NE(HIGH_RESOLUTION, to_remove[i]->resolution());
tilings_->Remove(to_remove[i]);
}
-
DCHECK_GT(tilings_->num_tilings(), 0u);
+
SanityCheckTilingState();
}
@@ -1265,10 +1255,6 @@ bool PictureLayerImpl::CanHaveTilingWithScale(float contents_scale) const {
void PictureLayerImpl::SanityCheckTilingState() const {
#if DCHECK_IS_ON
- // Recycle tree doesn't have any restrictions.
- if (layer_tree_impl()->IsRecycleTree())
- return;
-
if (!CanHaveTilings()) {
DCHECK_EQ(0u, tilings_->num_tilings());
return;