| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index 0d4fbf9fd0806d37a567c2559c45470da83ad913..ae050e61a48f890ecef926615ea4a0f1b934f4db 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_recreated_(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->SetUIResourceEvictionCountRecreated(
|
| + ui_resource_eviction_count_recreated());
|
| +
|
| if (ViewportSizeInvalid())
|
| target_tree->SetViewportSizeInvalid();
|
| else
|
| @@ -383,6 +387,16 @@ void LayerTreeImpl::DidBecomeActive() {
|
| FindRootScrollLayer();
|
| }
|
|
|
| +void LayerTreeImpl::SetUIResourceEvictionCountRecreated(
|
| + uint64 ui_resource_eviction_count_recreated) {
|
| + if (ui_resource_eviction_count_recreated ==
|
| + ui_resource_eviction_count_recreated_)
|
| + return;
|
| +
|
| + ui_resource_eviction_count_recreated_ = ui_resource_eviction_count_recreated;
|
| + layer_tree_host_impl_->OnCanDrawStateChangedForTree();
|
| +}
|
| +
|
| bool LayerTreeImpl::ContentsTexturesPurged() const {
|
| return contents_textures_purged_;
|
| }
|
| @@ -624,6 +638,9 @@ void LayerTreeImpl::ProcessUIResourceRequestQueue() {
|
| case UIResourceRequest::UIResourceDelete:
|
| layer_tree_host_impl_->DeleteUIResource(req.id);
|
| break;
|
| + case UIResourceRequest::UIResourceEvictionRecreated:
|
| + SetUIResourceEvictionCountRecreated(req.eviction_count_recreated);
|
| + break;
|
| case UIResourceRequest::UIResourceInvalidRequest:
|
| NOTREACHED();
|
| break;
|
|
|