| 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;
|
|
|