| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 if (compositor_frame_sink_lost_) { | 444 if (compositor_frame_sink_lost_) { |
| 445 RequestNewCompositorFrameSink(); | 445 RequestNewCompositorFrameSink(); |
| 446 // RequestNewCompositorFrameSink could have synchronously created an output | 446 // RequestNewCompositorFrameSink could have synchronously created an output |
| 447 // surface, so check again before returning. | 447 // surface, so check again before returning. |
| 448 if (compositor_frame_sink_lost_) | 448 if (compositor_frame_sink_lost_) |
| 449 return; | 449 return; |
| 450 } | 450 } |
| 451 | 451 |
| 452 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( | 452 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( |
| 453 BEGINFRAME_FROM_HERE, frame_begin_time, base::TimeTicks(), | 453 BEGINFRAME_FROM_HERE, 0, 1, frame_begin_time, base::TimeTicks(), |
| 454 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL)); | 454 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL)); |
| 455 | 455 |
| 456 // Start the impl frame. | 456 // Start the impl frame. |
| 457 { | 457 { |
| 458 DebugScopedSetImplThread impl(task_runner_provider_); | 458 DebugScopedSetImplThread impl(task_runner_provider_); |
| 459 WillBeginImplFrame(begin_frame_args); | 459 WillBeginImplFrame(begin_frame_args); |
| 460 } | 460 } |
| 461 | 461 |
| 462 // Run the "main thread" and get it to commit. | 462 // Run the "main thread" and get it to commit. |
| 463 { | 463 { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 void SingleThreadProxy::DidFinishImplFrame() { | 744 void SingleThreadProxy::DidFinishImplFrame() { |
| 745 layer_tree_host_impl_->DidFinishImplFrame(); | 745 layer_tree_host_impl_->DidFinishImplFrame(); |
| 746 #if DCHECK_IS_ON() | 746 #if DCHECK_IS_ON() |
| 747 DCHECK(inside_impl_frame_) | 747 DCHECK(inside_impl_frame_) |
| 748 << "DidFinishImplFrame called while not inside an impl frame!"; | 748 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 749 inside_impl_frame_ = false; | 749 inside_impl_frame_ = false; |
| 750 #endif | 750 #endif |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace cc | 753 } // namespace cc |
| OLD | NEW |