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

Unified Diff: cc/trees/layer_tree_host.h

Issue 23621021: (not for review yet) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « base/memory/scoped_ptr.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index b5577e9697b31de8feae8f0bd243561aa70d0a15..3e473c20de7ed402e18c24e21410a4109cd8d2cc 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -88,6 +88,7 @@ struct CC_EXPORT UIResourceRequest {
enum UIResourceRequestType {
UIResourceCreate,
UIResourceDelete,
+ UIResourceEvictionAck,
UIResourceInvalidRequest
};
@@ -96,6 +97,7 @@ struct CC_EXPORT UIResourceRequest {
UIResourceRequestType type;
UIResourceId id;
scoped_refptr<UIResourceBitmap> bitmap;
+ uint64 ack;
};
class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) {
@@ -283,6 +285,12 @@ class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) {
// Deletes a UI resource. May safely be called more than once.
virtual void DeleteUIResource(UIResourceId id);
+ // Record the eviction count sent by the LayerTreeHostImpl at BeginFrame.
+ // If |ui_resource_eviction_count| value is more recent than the current
+ // value of |ui_resource_eviction_count_last_acked_|, then add the recreation
+ // of all UI resources to the UIResourceRequestQueue.
+ void SetUIResourceEvictionCountToAck(uint64 ui_resource_eviction_count);
+
bool UsingSharedMemoryResources();
int id() const { return tree_id_; }
@@ -327,6 +335,7 @@ class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) {
typedef std::list<UIResourceRequest> UIResourceRequestQueue;
UIResourceRequestQueue ui_resource_request_queue_;
+ uint64 ui_resource_eviction_count_last_acked_;
void CalculateLCDTextMetricsCallback(Layer* layer);
« no previous file with comments | « base/memory/scoped_ptr.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698