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

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

Issue 1152153003: [WIP] cc: Plumb frame timing info without using a commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); 579 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
580 if (scheduler_on_impl_thread_) 580 if (scheduler_on_impl_thread_)
581 scheduler_on_impl_thread_->DidSwapBuffersComplete(); 581 scheduler_on_impl_thread_->DidSwapBuffersComplete();
582 layer_tree_host_->DidCompleteSwapBuffers(); 582 layer_tree_host_->DidCompleteSwapBuffers();
583 } 583 }
584 584
585 void SingleThreadProxy::OnDrawForOutputSurface() { 585 void SingleThreadProxy::OnDrawForOutputSurface() {
586 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; 586 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor.";
587 } 587 }
588 588
589 void SingleThreadProxy::PostFrameTimingEventsOnImplThread(
590 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
591 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
592 layer_tree_host_->RecordFrameTimingEvents(composite_events.Pass(),
593 main_frame_events.Pass());
594 }
595
589 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { 596 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
590 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); 597 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately");
591 DCHECK(Proxy::IsMainThread()); 598 DCHECK(Proxy::IsMainThread());
592 #if DCHECK_IS_ON() 599 #if DCHECK_IS_ON()
593 DCHECK(!inside_impl_frame_); 600 DCHECK(!inside_impl_frame_);
594 #endif 601 #endif
595 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); 602 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true);
596 603
597 if (layer_tree_host_->output_surface_lost()) { 604 if (layer_tree_host_->output_surface_lost()) {
598 RequestNewOutputSurface(); 605 RequestNewOutputSurface();
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 << "DidFinishImplFrame called while not inside an impl frame!"; 1002 << "DidFinishImplFrame called while not inside an impl frame!";
996 inside_impl_frame_ = false; 1003 inside_impl_frame_ = false;
997 #endif 1004 #endif
998 } 1005 }
999 1006
1000 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 1007 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
1001 layer_tree_host_->SendBeginFramesToChildren(args); 1008 layer_tree_host_->SendBeginFramesToChildren(args);
1002 } 1009 }
1003 1010
1004 } // namespace cc 1011 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698