| Index: cc/resources/tile_manager.cc
|
| diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
|
| index ec0d2c104eac2b0702ce23c3f2ddb2c6fcb95abc..3497ed3408233d791ffd339b241c895007ca0cf1 100644
|
| --- a/cc/resources/tile_manager.cc
|
| +++ b/cc/resources/tile_manager.cc
|
| @@ -249,6 +249,12 @@ void TileManager::DidFinishRunningTasks() {
|
| return;
|
| }
|
|
|
| + // We don't reserve memory for required-for-activation tiles during
|
| + // smoothness mode, so it is very likely these tiles will not get memory.
|
| + // This prevents raster-on-demand and simply delays activation in this case.
|
| + bool allow_rasterize_on_demand = global_state_.tree_priority
|
| + != SMOOTHNESS_TAKES_PRIORITY;
|
| +
|
| // Use on-demand raster for any required-for-activation tiles that have not
|
| // been been assigned memory after reaching a steady memory state. This
|
| // ensures that we activate even when OOM.
|
| @@ -258,8 +264,12 @@ void TileManager::DidFinishRunningTasks() {
|
| ManagedTileState::TileVersion& tile_version =
|
| mts.tile_versions[mts.raster_mode];
|
|
|
| - if (tile->required_for_activation() && !tile_version.IsReadyToDraw())
|
| + if (tile->required_for_activation() && !tile_version.IsReadyToDraw()) {
|
| + // If we can't raster on demand, give up early (and don't activate).
|
| + if (!allow_rasterize_on_demand)
|
| + return;
|
| tile_version.set_rasterize_on_demand();
|
| + }
|
| }
|
|
|
| client_->NotifyReadyToActivate();
|
|
|