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

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 typo 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 | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4efbffa144c3f3c7f4cb2c2a2fff8891f7c2eef1..cd5eda59a8eccd59166fd4549fbf25cc4c1f32b4 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -6,6 +6,7 @@
#define CC_TREES_LAYER_TREE_HOST_IMPL_H_
#include <list>
+#include <set>
#include <string>
#include <vector>
@@ -401,7 +402,8 @@ class CC_EXPORT LayerTreeHostImpl
scoped_refptr<UIResourceBitmap> bitmap);
// Deletes a UI resource. May safely be called more than once.
void DeleteUIResource(UIResourceId uid);
- void DeleteAllUIResources();
+ void EvictAllUIResources();
+ bool EvictedUIResourcesExist() const;
ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
@@ -480,10 +482,17 @@ class CC_EXPORT LayerTreeHostImpl
void DidInitializeVisibleTile();
+ void MarkUIResourceNotEvicted(UIResourceId uid);
+
typedef base::hash_map<UIResourceId, ResourceProvider::ResourceId>
UIResourceMap;
UIResourceMap ui_resource_map_;
+ // Resources that were evicted by EvictAllUIResources. Resources are removed
+ // from this when they are touched by a create or destroy from the UI resource
+ // request queue.
+ std::set<UIResourceId> evicted_ui_resources_;
+
scoped_ptr<OutputSurface> output_surface_;
scoped_refptr<ContextProvider> offscreen_context_provider_;
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698