| 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" |
| 11 #include "cc/animation/animation_events.h" | 11 #include "cc/animation/animation_events.h" |
| 12 #include "cc/debug/benchmark_instrumentation.h" | 12 #include "cc/debug/benchmark_instrumentation.h" |
| 13 #include "cc/debug/devtools_instrumentation.h" | 13 #include "cc/debug/devtools_instrumentation.h" |
| 14 #include "cc/output/context_provider.h" | 14 #include "cc/output/context_provider.h" |
| 15 #include "cc/output/output_surface.h" | 15 #include "cc/output/output_surface.h" |
| 16 #include "cc/quads/draw_quad.h" | 16 #include "cc/quads/draw_quad.h" |
| 17 #include "cc/resources/ui_resource_manager.h" | 17 #include "cc/resources/ui_resource_manager.h" |
| 18 #include "cc/scheduler/commit_earlyout_reason.h" | 18 #include "cc/scheduler/commit_earlyout_reason.h" |
| 19 #include "cc/scheduler/compositor_timing_history.h" | 19 #include "cc/scheduler/compositor_timing_history.h" |
| 20 #include "cc/scheduler/delay_based_time_source.h" | 20 #include "cc/scheduler/delay_based_time_source.h" |
| 21 #include "cc/scheduler/scheduler.h" | 21 #include "cc/scheduler/scheduler.h" |
| 22 #include "cc/trees/layer_tree_host.h" | |
| 23 #include "cc/trees/layer_tree_host_common.h" | 22 #include "cc/trees/layer_tree_host_common.h" |
| 23 #include "cc/trees/layer_tree_host_in_process.h" |
| 24 #include "cc/trees/layer_tree_host_single_thread_client.h" | 24 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 25 #include "cc/trees/layer_tree_impl.h" | 25 #include "cc/trees/layer_tree_impl.h" |
| 26 #include "cc/trees/scoped_abort_remaining_swap_promises.h" | 26 #include "cc/trees/scoped_abort_remaining_swap_promises.h" |
| 27 | 27 |
| 28 namespace cc { | 28 namespace cc { |
| 29 | 29 |
| 30 std::unique_ptr<Proxy> SingleThreadProxy::Create( | 30 std::unique_ptr<Proxy> SingleThreadProxy::Create( |
| 31 LayerTreeHost* layer_tree_host, | 31 LayerTreeHostInProcess* layer_tree_host, |
| 32 LayerTreeHostSingleThreadClient* client, | 32 LayerTreeHostSingleThreadClient* client, |
| 33 TaskRunnerProvider* task_runner_provider) { | 33 TaskRunnerProvider* task_runner_provider) { |
| 34 return base::WrapUnique( | 34 return base::WrapUnique( |
| 35 new SingleThreadProxy(layer_tree_host, client, task_runner_provider)); | 35 new SingleThreadProxy(layer_tree_host, client, task_runner_provider)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layer_tree_host, | 38 SingleThreadProxy::SingleThreadProxy(LayerTreeHostInProcess* layer_tree_host, |
| 39 LayerTreeHostSingleThreadClient* client, | 39 LayerTreeHostSingleThreadClient* client, |
| 40 TaskRunnerProvider* task_runner_provider) | 40 TaskRunnerProvider* task_runner_provider) |
| 41 : layer_tree_host_(layer_tree_host), | 41 : layer_tree_host_(layer_tree_host), |
| 42 client_(client), | 42 client_(client), |
| 43 task_runner_provider_(task_runner_provider), | 43 task_runner_provider_(task_runner_provider), |
| 44 next_frame_is_newly_committed_frame_(false), | 44 next_frame_is_newly_committed_frame_(false), |
| 45 #if DCHECK_IS_ON() | 45 #if DCHECK_IS_ON() |
| 46 inside_impl_frame_(false), | 46 inside_impl_frame_(false), |
| 47 #endif | 47 #endif |
| 48 inside_draw_(false), | 48 inside_draw_(false), |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 void SingleThreadProxy::DidFinishImplFrame() { | 761 void SingleThreadProxy::DidFinishImplFrame() { |
| 762 layer_tree_host_impl_->DidFinishImplFrame(); | 762 layer_tree_host_impl_->DidFinishImplFrame(); |
| 763 #if DCHECK_IS_ON() | 763 #if DCHECK_IS_ON() |
| 764 DCHECK(inside_impl_frame_) | 764 DCHECK(inside_impl_frame_) |
| 765 << "DidFinishImplFrame called while not inside an impl frame!"; | 765 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 766 inside_impl_frame_ = false; | 766 inside_impl_frame_ = false; |
| 767 #endif | 767 #endif |
| 768 } | 768 } |
| 769 | 769 |
| 770 } // namespace cc | 770 } // namespace cc |
| OLD | NEW |