| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index dda25ecb79ad4b24337fa6a00cda38c3bbd4b5e6..e69ad30de139983d5d6b8a8b7aa8bdd776e9adcc 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() {}
|
|
|
|
|