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

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

Issue 797693004: Implement SingleThreadProxy CommitVSyncParameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 DebugScopedSetMainThread main(this); 456 DebugScopedSetMainThread main(this);
457 // This must happen before we notify the scheduler as it may try to recreate 457 // This must happen before we notify the scheduler as it may try to recreate
458 // the output surface if already in BEGIN_IMPL_FRAME_STATE_IDLE. 458 // the output surface if already in BEGIN_IMPL_FRAME_STATE_IDLE.
459 layer_tree_host_->DidLoseOutputSurface(); 459 layer_tree_host_->DidLoseOutputSurface();
460 } 460 }
461 client_->DidAbortSwapBuffers(); 461 client_->DidAbortSwapBuffers();
462 if (scheduler_on_impl_thread_) 462 if (scheduler_on_impl_thread_)
463 scheduler_on_impl_thread_->DidLoseOutputSurface(); 463 scheduler_on_impl_thread_->DidLoseOutputSurface();
464 } 464 }
465 465
466 void SingleThreadProxy::CommitVSyncParameters(base::TimeTicks timebase,
467 base::TimeDelta interval) {
468 if (scheduler_on_impl_thread_)
enne (OOO) 2014/12/15 19:25:15 Actually, should this be a DCHECK? Does this get c
brianderson 2014/12/15 19:59:50 I wouldn't expect this to get called before the sc
469 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval);
470 }
471
466 void SingleThreadProxy::DidSwapBuffersOnImplThread() { 472 void SingleThreadProxy::DidSwapBuffersOnImplThread() {
467 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); 473 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread");
468 if (scheduler_on_impl_thread_) 474 if (scheduler_on_impl_thread_)
469 scheduler_on_impl_thread_->DidSwapBuffers(); 475 scheduler_on_impl_thread_->DidSwapBuffers();
470 client_->DidPostSwapBuffers(); 476 client_->DidPostSwapBuffers();
471 } 477 }
472 478
473 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { 479 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
474 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); 480 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
475 if (scheduler_on_impl_thread_) 481 if (scheduler_on_impl_thread_)
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 800
795 void SingleThreadProxy::DidBeginImplFrameDeadline() { 801 void SingleThreadProxy::DidBeginImplFrameDeadline() {
796 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 802 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
797 } 803 }
798 804
799 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 805 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
800 layer_tree_host_->SendBeginFramesToChildren(args); 806 layer_tree_host_->SendBeginFramesToChildren(args);
801 } 807 }
802 808
803 } // namespace cc 809 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698