| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index dda25ecb79ad4b24337fa6a00cda38c3bbd4b5e6..9514dc04a8e5db179f6d331c5be3f82cb757551f 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -685,6 +685,8 @@ void ThreadProxy::ScheduledActionSendBeginFrameToMainThread() {
|
| layer_tree_host_impl_->CurrentPhysicalTimeTicks();
|
| begin_frame_state->scroll_info =
|
| layer_tree_host_impl_->ProcessScrollDeltas();
|
| + begin_frame_state->ui_resource_eviction_count =
|
| + layer_tree_host_impl_->ui_resource_eviction_count();
|
|
|
| if (!layer_tree_host_impl_->settings().impl_side_painting) {
|
| DCHECK_GT(layer_tree_host_impl_->memory_allocation_limit_bytes(), 0u);
|
| @@ -751,11 +753,15 @@ void ThreadProxy::BeginFrameOnMainThread(
|
|
|
| layer_tree_host_->WillBeginFrame();
|
|
|
| + bool recreated_evicted_ui_resources = false;
|
| if (begin_frame_state) {
|
| layer_tree_host_->UpdateClientAnimations(
|
| begin_frame_state->monotonic_frame_begin_time);
|
| layer_tree_host_->AnimateLayers(
|
| begin_frame_state->monotonic_frame_begin_time);
|
| + recreated_evicted_ui_resources =
|
| + layer_tree_host_->SetUIResourceEvictionCount(
|
| + begin_frame_state->ui_resource_eviction_count);
|
| }
|
|
|
| // Unlink any backings that the impl thread has evicted, so that we know to
|
| @@ -773,7 +779,9 @@ void ThreadProxy::BeginFrameOnMainThread(
|
| commit_requested_ = false;
|
| commit_request_sent_to_impl_thread_ = false;
|
| bool can_cancel_this_commit =
|
| - can_cancel_commit_ && !in_composite_and_readback_;
|
| + can_cancel_commit_ &&
|
| + !in_composite_and_readback_ &&
|
| + !recreated_evicted_ui_resources;
|
| can_cancel_commit_ = true;
|
|
|
| scoped_ptr<ResourceUpdateQueue> queue =
|
| @@ -1353,7 +1361,8 @@ size_t ThreadProxy::MaxPartialTextureUpdates() const {
|
| }
|
|
|
| ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState()
|
| - : memory_allocation_limit_bytes(0) {}
|
| + : memory_allocation_limit_bytes(0),
|
| + ui_resource_eviction_count(0) {}
|
|
|
| ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() {}
|
|
|
| @@ -1458,6 +1467,8 @@ void ThreadProxy::RenewTreePriority() {
|
| // evicted resources or there is an invalid viewport size.
|
| if (layer_tree_host_impl_->active_tree()->ContentsTexturesPurged() ||
|
| layer_tree_host_impl_->active_tree()->ViewportSizeInvalid() ||
|
| + layer_tree_host_impl_->active_tree()->
|
| + UIResourcesEvictedHaveNotBeenRecreated() ||
|
| input_throttled_until_commit_)
|
| priority = NEW_CONTENT_TAKES_PRIORITY;
|
|
|
|
|