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

Unified Diff: cc/trees/layer_tree_impl.cc

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 | « cc/trees/layer_tree_impl.h ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 52a539b94f461e920800d4421991b37e3283012a..18c77dbcaf0f076301a2220337f3acaf1fc30a86 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -33,6 +33,7 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
min_page_scale_factor_(0),
max_page_scale_factor_(0),
scrolling_layer_id_from_previous_tree_(0),
+ ui_resource_eviction_count_acked_(0),
contents_textures_purged_(false),
viewport_size_invalid_(false),
needs_update_draw_properties_(true),
@@ -126,6 +127,9 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
else
target_tree->ResetContentsTexturesPurged();
+ target_tree->SetUIResourceEvictionCountAcked(
+ ui_resource_eviction_count_acked());
+
if (ViewportSizeInvalid())
target_tree->SetViewportSizeInvalid();
else
@@ -382,6 +386,15 @@ void LayerTreeImpl::DidBecomeActive() {
FindRootScrollLayer();
}
+void LayerTreeImpl::SetUIResourceEvictionCountAcked(
+ uint64 ui_resource_eviction_count_acked) {
+ if (ui_resource_eviction_count_acked == ui_resource_eviction_count_acked_)
+ return;
+
+ ui_resource_eviction_count_acked_ = ui_resource_eviction_count_acked;
+ layer_tree_host_impl_->OnCanDrawStateChangedForTree();
+}
+
bool LayerTreeImpl::ContentsTexturesPurged() const {
return contents_textures_purged_;
}
@@ -619,6 +632,9 @@ void LayerTreeImpl::ProcessUIResourceRequestQueue() {
case UIResourceRequest::UIResourceDelete:
layer_tree_host_impl_->DeleteUIResource(req.id);
break;
+ case UIResourceRequest::UIResourceEvictionAck:
+ SetUIResourceEvictionCountAcked(req.ack);
+ break;
case UIResourceRequest::UIResourceInvalidRequest:
NOTREACHED();
break;
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698