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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 23548022: [cc] Evict UIResources when the renderer is not visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/output/context_provider.h" 9 #include "cc/output/context_provider.h"
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 layer_tree_host_->BeginCommitOnImplThread(layer_tree_host_impl_.get()); 203 layer_tree_host_->BeginCommitOnImplThread(layer_tree_host_impl_.get());
204 204
205 scoped_ptr<ResourceUpdateController> update_controller = 205 scoped_ptr<ResourceUpdateController> update_controller =
206 ResourceUpdateController::Create( 206 ResourceUpdateController::Create(
207 NULL, 207 NULL,
208 Proxy::MainThreadTaskRunner(), 208 Proxy::MainThreadTaskRunner(),
209 queue.Pass(), 209 queue.Pass(),
210 layer_tree_host_impl_->resource_provider()); 210 layer_tree_host_impl_->resource_provider());
211 update_controller->Finalize(); 211 update_controller->Finalize();
212 212
213 if (layer_tree_host_impl_->EvictedUIResourcesExist())
214 layer_tree_host_->RecreateUIResources();
215
213 layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get()); 216 layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get());
214 217
215 layer_tree_host_impl_->CommitComplete(); 218 layer_tree_host_impl_->CommitComplete();
216 219
217 #ifndef NDEBUG 220 #ifndef NDEBUG
218 // In the single-threaded case, the scale and scroll deltas should never be 221 // In the single-threaded case, the scale and scroll deltas should never be
219 // touched on the impl layer tree. 222 // touched on the impl layer tree.
220 scoped_ptr<ScrollAndScaleSet> scroll_info = 223 scoped_ptr<ScrollAndScaleSet> scroll_info =
221 layer_tree_host_impl_->ProcessScrollDeltas(); 224 layer_tree_host_impl_->ProcessScrollDeltas();
222 DCHECK(!scroll_info->scrolls.size()); 225 DCHECK(!scroll_info->scrolls.size());
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void SingleThreadProxy::DidSwapFrame() { 501 void SingleThreadProxy::DidSwapFrame() {
499 if (next_frame_is_newly_committed_frame_) { 502 if (next_frame_is_newly_committed_frame_) {
500 next_frame_is_newly_committed_frame_ = false; 503 next_frame_is_newly_committed_frame_ = false;
501 layer_tree_host_->DidCommitAndDrawFrame(); 504 layer_tree_host_->DidCommitAndDrawFrame();
502 } 505 }
503 } 506 }
504 507
505 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 508 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
506 509
507 } // namespace cc 510 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698