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

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

Issue 22469002: cc: Fix aborted commits with evicted textures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded scrolling from test Created 7 years, 4 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_host_unittest_animation.cc ('k') | cc/trees/thread_proxy.cc » ('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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void SingleThreadProxy::SetLayerTreeHostClientReady() { 93 void SingleThreadProxy::SetLayerTreeHostClientReady() {
94 // Scheduling is controlled by the embedder in the single thread case, so 94 // Scheduling is controlled by the embedder in the single thread case, so
95 // nothing to do. 95 // nothing to do.
96 } 96 }
97 97
98 void SingleThreadProxy::SetVisible(bool visible) { 98 void SingleThreadProxy::SetVisible(bool visible) {
99 DebugScopedSetImplThread impl(this); 99 DebugScopedSetImplThread impl(this);
100 layer_tree_host_impl_->SetVisible(visible); 100 layer_tree_host_impl_->SetVisible(visible);
101
102 // Changing visibility could change ShouldComposite().
103 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(!ShouldComposite());
101 } 104 }
102 105
103 void SingleThreadProxy::CreateAndInitializeOutputSurface() { 106 void SingleThreadProxy::CreateAndInitializeOutputSurface() {
104 TRACE_EVENT0( 107 TRACE_EVENT0(
105 "cc", "SingleThreadProxy::CreateAndInitializeOutputSurface"); 108 "cc", "SingleThreadProxy::CreateAndInitializeOutputSurface");
106 DCHECK(Proxy::IsMainThread()); 109 DCHECK(Proxy::IsMainThread());
107 110
108 scoped_ptr<OutputSurface> output_surface = first_output_surface_.Pass(); 111 scoped_ptr<OutputSurface> output_surface = first_output_surface_.Pass();
109 if (!output_surface) 112 if (!output_surface)
110 output_surface = layer_tree_host_->CreateOutputSurface(); 113 output_surface = layer_tree_host_->CreateOutputSurface();
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 void SingleThreadProxy::DidSwapFrame() { 489 void SingleThreadProxy::DidSwapFrame() {
487 if (next_frame_is_newly_committed_frame_) { 490 if (next_frame_is_newly_committed_frame_) {
488 next_frame_is_newly_committed_frame_ = false; 491 next_frame_is_newly_committed_frame_ = false;
489 layer_tree_host_->DidCommitAndDrawFrame(); 492 layer_tree_host_->DidCommitAndDrawFrame();
490 } 493 }
491 } 494 }
492 495
493 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 496 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
494 497
495 } // namespace cc 498 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698