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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 23548022: [cc] Evict UIResources when the renderer is not visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix names 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
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 55ccab68a6b0cdc647602a703bbbc8923a820300..f420fb86bfb201699fe77fe1e213efc690910bd2 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -342,6 +342,10 @@ class CC_EXPORT LayerTreeHostImpl
return animation_registrar_.get();
}
+ uint64 ui_resource_eviction_count() const {
+ return ui_resource_eviction_count_;
+ }
+
void SetDebugState(const LayerTreeDebugState& new_debug_state);
const LayerTreeDebugState& debug_state() const { return debug_state_; }
@@ -599,6 +603,13 @@ class CC_EXPORT LayerTreeHostImpl
bool need_to_update_visible_tiles_before_draw_;
+ // The number of times that UI resources have been evicted since creation.
+ // This is passed to LayerTreeHost at frame creation. If the LayerTreeHost
+ // has not recreated its resources for this eviction count, it will recreate
+ // all resources and pass this counter back through the UI resource update
+ // queue.
+ uint64 ui_resource_eviction_count_;
+
// Optional callback to notify of new tree activations.
base::Closure tree_activation_callback_;

Powered by Google App Engine
This is Rietveld 408576698