Chromium Code Reviews| 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) |
|
brianderson
2013/09/10 02:35:19
Instead of calling ManageTiles again, would it wor
epenner
2013/09/10 18:13:39
The trouble is we are not ready to activate. Poten
reveman
2013/09/10 19:21:20
We should be calling ManageTiles as a result of ch
|
| + return; |
| tile_version.set_rasterize_on_demand(); |
| + } |
| } |
| client_->NotifyReadyToActivate(); |