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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 if (scheduler_on_impl_thread_) | 522 if (scheduler_on_impl_thread_) |
523 scheduler_on_impl_thread_->DidSwapBuffersComplete(); | 523 scheduler_on_impl_thread_->DidSwapBuffersComplete(); |
524 layer_tree_host_->DidCompleteSwapBuffers(); | 524 layer_tree_host_->DidCompleteSwapBuffers(); |
525 } | 525 } |
526 | 526 |
527 void SingleThreadProxy::OnDrawForOutputSurface( | 527 void SingleThreadProxy::OnDrawForOutputSurface( |
528 bool resourceless_software_draw) { | 528 bool resourceless_software_draw) { |
529 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; | 529 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; |
530 } | 530 } |
531 | 531 |
532 void SingleThreadProxy::PostFrameTimingEventsOnImplThread( | |
533 std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | |
534 std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | |
535 layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events), | |
536 std::move(main_frame_events)); | |
537 } | |
538 | |
539 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 532 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
540 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); | 533 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); |
541 DCHECK(task_runner_provider_->IsMainThread()); | 534 DCHECK(task_runner_provider_->IsMainThread()); |
542 #if DCHECK_IS_ON() | 535 #if DCHECK_IS_ON() |
543 DCHECK(!inside_impl_frame_); | 536 DCHECK(!inside_impl_frame_); |
544 #endif | 537 #endif |
545 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 538 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
546 | 539 |
547 if (layer_tree_host_->output_surface_lost()) { | 540 if (layer_tree_host_->output_surface_lost()) { |
548 RequestNewOutputSurface(); | 541 RequestNewOutputSurface(); |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 void SingleThreadProxy::DidFinishImplFrame() { | 895 void SingleThreadProxy::DidFinishImplFrame() { |
903 layer_tree_host_impl_->DidFinishImplFrame(); | 896 layer_tree_host_impl_->DidFinishImplFrame(); |
904 #if DCHECK_IS_ON() | 897 #if DCHECK_IS_ON() |
905 DCHECK(inside_impl_frame_) | 898 DCHECK(inside_impl_frame_) |
906 << "DidFinishImplFrame called while not inside an impl frame!"; | 899 << "DidFinishImplFrame called while not inside an impl frame!"; |
907 inside_impl_frame_ = false; | 900 inside_impl_frame_ = false; |
908 #endif | 901 #endif |
909 } | 902 } |
910 | 903 |
911 } // namespace cc | 904 } // namespace cc |
OLD | NEW |