Commit bc4cd9e3 authored by vmpstr@chromium.org's avatar vmpstr@chromium.org

cc: Ensure that layers with invalid tile priorities don't raster.

This patch ensures that when a layer is does not have valid tile
priorities (ie it's recycled, or it's not in the render surface
layer list), then the raster iterator will not return any tiles.

BUG=381704
R=reveman

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276896 0039d316-1c4b-4281-b951-d872f2087c98
parent 30bf3400
......@@ -1442,11 +1442,20 @@ PictureLayerImpl::LayerRasterTileIterator::LayerRasterTileIterator(
bool prioritize_low_res)
: layer_(layer), current_stage_(0) {
DCHECK(layer_);
// Early out if the layer has no tilings.
if (!layer_->tilings_ || !layer_->tilings_->num_tilings()) {
current_stage_ = arraysize(stages_);
return;
}
// Tiles without valid priority are treated as having lowest priority and
// never considered for raster.
if (!layer_->HasValidTilePriorities()) {
current_stage_ = arraysize(stages_);
return;
}
WhichTree tree =
layer_->layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
......@@ -1546,6 +1555,10 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
iteration_stage_(TilePriority::EVENTUALLY),
required_for_activation_(false),
layer_(layer) {
// Early out if the layer has no tilings.
// TODO(vmpstr): Once tile priorities are determined by the iterators, ensure
// that layers that don't have valid tile priorities have lowest priorities so
// they evict their tiles first (crbug.com/381704)
if (!layer_->tilings_ || !layer_->tilings_->num_tilings())
return;
......
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