OLD | NEW |
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 578 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
579 if (scheduler_on_impl_thread_) | 579 if (scheduler_on_impl_thread_) |
580 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 580 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
581 layer_tree_host_->DidCompleteSwapBuffers(); | 581 layer_tree_host_->DidCompleteSwapBuffers(); |
582 } | 582 } |
583 | 583 |
584 void SingleThreadProxy::OnDrawForOutputSurface() { | 584 void SingleThreadProxy::OnDrawForOutputSurface() { |
585 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; | 585 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; |
586 } | 586 } |
587 | 587 |
| 588 void SingleThreadProxy::PostFrameTimingEventsOnImplThread( |
| 589 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 590 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
| 591 layer_tree_host_->RecordFrameTimingEvents(composite_events.Pass(), |
| 592 main_frame_events.Pass()); |
| 593 } |
| 594 |
588 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 595 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
589 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); | 596 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); |
590 DCHECK(Proxy::IsMainThread()); | 597 DCHECK(Proxy::IsMainThread()); |
591 #if DCHECK_IS_ON() | 598 #if DCHECK_IS_ON() |
592 DCHECK(!inside_impl_frame_); | 599 DCHECK(!inside_impl_frame_); |
593 #endif | 600 #endif |
594 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 601 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
595 | 602 |
596 if (layer_tree_host_->output_surface_lost()) { | 603 if (layer_tree_host_->output_surface_lost()) { |
597 RequestNewOutputSurface(); | 604 RequestNewOutputSurface(); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 << "DidFinishImplFrame called while not inside an impl frame!"; | 1001 << "DidFinishImplFrame called while not inside an impl frame!"; |
995 inside_impl_frame_ = false; | 1002 inside_impl_frame_ = false; |
996 #endif | 1003 #endif |
997 } | 1004 } |
998 | 1005 |
999 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 1006 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
1000 layer_tree_host_->SendBeginFramesToChildren(args); | 1007 layer_tree_host_->SendBeginFramesToChildren(args); |
1001 } | 1008 } |
1002 | 1009 |
1003 } // namespace cc | 1010 } // namespace cc |
OLD | NEW |