Commit a3f9efb6 authored by boliu@chromium.org's avatar boliu@chromium.org

cc: Fix PictureLayerImpl::SanityCheck condition

PictureLayerImpl::ReleaseResources calls
set_needs_update_draw_properties, expecting as a result that if it is
false again, that CalculateContentsScale is called in between. However
this assumption is not true as CalculateDrawProperties can skip layers.

Instead, also check should_update_tile_priorities_ which is set in
CalculateContentsScale.

BUG=358350

Review URL: https://codereview.chromium.org/258053011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266813 0039d316-1c4b-4281-b951-d872f2087c98
parent 310d42c2
......@@ -676,7 +676,12 @@ void PictureLayerImpl::SyncTiling(
return;
tilings_->AddTiling(tiling->contents_scale());
if (!layer_tree_impl()->needs_update_draw_properties()) {
// If this tree needs update draw properties, then the tiling will
// get updated prior to drawing or activation. If this tree does not
// need update draw properties, then its transforms are up to date and
// we can create tiles for this tiling immediately.
if (!layer_tree_impl()->needs_update_draw_properties() &&
should_update_tile_priorities_) {
// When the tree is up to date, the set of tilings must either be empty or
// contain at least one high resolution tiling. (If it is up to date,
// then it would be invalid to sync a tiling if it is the first tiling
......@@ -684,15 +689,9 @@ void PictureLayerImpl::SyncTiling(
SanityCheckTilingState();
// TODO(enne): temporary sanity CHECK for http://crbug.com/358350
CHECK_GT(tilings_->num_tilings(), 1u);
}
// If this tree needs update draw properties, then the tiling will
// get updated prior to drawing or activation. If this tree does not
// need update draw properties, then its transforms are up to date and
// we can create tiles for this tiling immediately.
if (!layer_tree_impl()->needs_update_draw_properties() &&
should_update_tile_priorities_)
UpdateTilePriorities();
}
}
void PictureLayerImpl::SetIsMask(bool is_mask) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment