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

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

Issue 141833002: Revert 245445 "Unifies LayerTreeHost::SetNeedsUpdateLayers and S..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | « trunk/src/cc/trees/single_thread_proxy.h ('k') | trunk/src/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/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 SetNeedsCommit(); 168 SetNeedsCommit();
169 } 169 }
170 } 170 }
171 171
172 const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const { 172 const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const {
173 DCHECK(Proxy::IsMainThread()); 173 DCHECK(Proxy::IsMainThread());
174 DCHECK(!layer_tree_host_->output_surface_lost()); 174 DCHECK(!layer_tree_host_->output_surface_lost());
175 return renderer_capabilities_for_main_thread_; 175 return renderer_capabilities_for_main_thread_;
176 } 176 }
177 177
178 void SingleThreadProxy::SetNeedsAnimate() {
179 DCHECK(Proxy::IsMainThread());
180 client_->ScheduleAnimation();
181 }
182
178 void SingleThreadProxy::SetNeedsUpdateLayers() { 183 void SingleThreadProxy::SetNeedsUpdateLayers() {
179 DCHECK(Proxy::IsMainThread()); 184 DCHECK(Proxy::IsMainThread());
180 client_->ScheduleAnimation(); 185 client_->ScheduleComposite();
181 } 186 }
182 187
183 void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) { 188 void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
184 DCHECK(Proxy::IsMainThread()); 189 DCHECK(Proxy::IsMainThread());
185 // Commit immediately. 190 // Commit immediately.
186 { 191 {
187 DebugScopedSetMainThreadBlocked main_thread_blocked(this); 192 DebugScopedSetMainThreadBlocked main_thread_blocked(this);
188 DebugScopedSetImplThread impl(this); 193 DebugScopedSetImplThread impl(this);
189 194
190 // This CapturePostTasks should be destroyed before CommitComplete() is 195 // This CapturePostTasks should be destroyed before CommitComplete() is
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 void SingleThreadProxy::DidSwapFrame() { 548 void SingleThreadProxy::DidSwapFrame() {
544 if (next_frame_is_newly_committed_frame_) { 549 if (next_frame_is_newly_committed_frame_) {
545 next_frame_is_newly_committed_frame_ = false; 550 next_frame_is_newly_committed_frame_ = false;
546 layer_tree_host_->DidCommitAndDrawFrame(); 551 layer_tree_host_->DidCommitAndDrawFrame();
547 } 552 }
548 } 553 }
549 554
550 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 555 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
551 556
552 } // namespace cc 557 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/trees/single_thread_proxy.h ('k') | trunk/src/cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698