Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2142)

Unified Diff: cc/resources/tile_manager.cc

Issue 23495022: CC: Add a scheduled action for ManageTiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call ManageTiles. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698