Chromium Code Reviews| 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 603 if (layer_tree_host_->output_surface_lost()) { | 603 if (layer_tree_host_->output_surface_lost()) { |
| 604 RequestNewOutputSurface(); | 604 RequestNewOutputSurface(); |
| 605 // RequestNewOutputSurface could have synchronously created an output | 605 // RequestNewOutputSurface could have synchronously created an output |
| 606 // surface, so check again before returning. | 606 // surface, so check again before returning. |
| 607 if (layer_tree_host_->output_surface_lost()) | 607 if (layer_tree_host_->output_surface_lost()) |
| 608 return; | 608 return; |
| 609 } | 609 } |
| 610 | 610 |
| 611 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( | 611 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( |
| 612 BEGINFRAME_FROM_HERE, frame_begin_time, base::TimeTicks(), | 612 BEGINFRAME_FROM_HERE, frame_begin_time, base::TimeTicks(), |
| 613 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL)); | 613 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL, |
| 614 scheduler_on_impl_thread_ | |
| 615 ? scheduler_on_impl_thread_->MainThreadOnCriticalPath() | |
|
Sami
2015/06/08 11:47:53
I think this should default to true when we are us
alex clarke (OOO till 29th)
2015/06/08 16:58:07
Done.
| |
| 616 : false)); | |
| 614 | 617 |
| 615 // Start the impl frame. | 618 // Start the impl frame. |
| 616 { | 619 { |
| 617 DebugScopedSetImplThread impl(this); | 620 DebugScopedSetImplThread impl(this); |
| 618 WillBeginImplFrame(begin_frame_args); | 621 WillBeginImplFrame(begin_frame_args); |
| 619 } | 622 } |
| 620 | 623 |
| 621 // Run the "main thread" and get it to commit. | 624 // Run the "main thread" and get it to commit. |
| 622 { | 625 { |
| 623 #if DCHECK_IS_ON() | 626 #if DCHECK_IS_ON() |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 << "DidFinishImplFrame called while not inside an impl frame!"; | 1004 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 1002 inside_impl_frame_ = false; | 1005 inside_impl_frame_ = false; |
| 1003 #endif | 1006 #endif |
| 1004 } | 1007 } |
| 1005 | 1008 |
| 1006 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 1009 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 1007 layer_tree_host_->SendBeginFramesToChildren(args); | 1010 layer_tree_host_->SendBeginFramesToChildren(args); |
| 1008 } | 1011 } |
| 1009 | 1012 |
| 1010 } // namespace cc | 1013 } // namespace cc |
| OLD | NEW |