OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/proxy_impl.h" | 5 #include "cc/trees/proxy_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "base/trace_event/trace_event_argument.h" | 13 #include "base/trace_event/trace_event_argument.h" |
14 #include "base/trace_event/trace_event_synthetic_delay.h" | 14 #include "base/trace_event/trace_event_synthetic_delay.h" |
15 #include "cc/animation/animation_events.h" | 15 #include "cc/animation/animation_events.h" |
16 #include "cc/debug/benchmark_instrumentation.h" | 16 #include "cc/debug/benchmark_instrumentation.h" |
17 #include "cc/debug/devtools_instrumentation.h" | 17 #include "cc/debug/devtools_instrumentation.h" |
18 #include "cc/input/top_controls_manager.h" | 18 #include "cc/input/browser_controls_offset_manager.h" |
19 #include "cc/output/compositor_frame_sink.h" | 19 #include "cc/output/compositor_frame_sink.h" |
20 #include "cc/output/context_provider.h" | 20 #include "cc/output/context_provider.h" |
21 #include "cc/scheduler/compositor_timing_history.h" | 21 #include "cc/scheduler/compositor_timing_history.h" |
22 #include "cc/scheduler/delay_based_time_source.h" | 22 #include "cc/scheduler/delay_based_time_source.h" |
23 #include "cc/trees/layer_tree_host_in_process.h" | 23 #include "cc/trees/layer_tree_host_in_process.h" |
24 #include "cc/trees/layer_tree_impl.h" | 24 #include "cc/trees/layer_tree_impl.h" |
25 #include "cc/trees/task_runner_provider.h" | 25 #include "cc/trees/task_runner_provider.h" |
26 #include "gpu/command_buffer/client/gles2_interface.h" | 26 #include "gpu/command_buffer/client/gles2_interface.h" |
27 | 27 |
28 namespace cc { | 28 namespace cc { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 smoothness_priority_expiration_notifier_.Shutdown(); | 104 smoothness_priority_expiration_notifier_.Shutdown(); |
105 } | 105 } |
106 | 106 |
107 void ProxyImpl::InitializeMutatorOnImpl( | 107 void ProxyImpl::InitializeMutatorOnImpl( |
108 std::unique_ptr<LayerTreeMutator> mutator) { | 108 std::unique_ptr<LayerTreeMutator> mutator) { |
109 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); | 109 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); |
110 DCHECK(IsImplThread()); | 110 DCHECK(IsImplThread()); |
111 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); | 111 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); |
112 } | 112 } |
113 | 113 |
114 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 114 void ProxyImpl::UpdateBrowserControlsStateOnImpl( |
115 TopControlsState current, | 115 BrowserControlsState constraints, |
116 bool animate) { | 116 BrowserControlsState current, |
| 117 bool animate) { |
117 DCHECK(IsImplThread()); | 118 DCHECK(IsImplThread()); |
118 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( | 119 layer_tree_host_impl_->browser_controls_manager()->UpdateBrowserControlsState( |
119 constraints, current, animate); | 120 constraints, current, animate); |
120 } | 121 } |
121 | 122 |
122 void ProxyImpl::InitializeCompositorFrameSinkOnImpl( | 123 void ProxyImpl::InitializeCompositorFrameSinkOnImpl( |
123 CompositorFrameSink* compositor_frame_sink) { | 124 CompositorFrameSink* compositor_frame_sink) { |
124 TRACE_EVENT0("cc", "ProxyImpl::InitializeCompositorFrameSinkOnImplThread"); | 125 TRACE_EVENT0("cc", "ProxyImpl::InitializeCompositorFrameSinkOnImplThread"); |
125 DCHECK(IsImplThread()); | 126 DCHECK(IsImplThread()); |
126 | 127 |
127 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get(); | 128 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get(); |
128 bool success = host_impl->InitializeRenderer(compositor_frame_sink); | 129 bool success = host_impl->InitializeRenderer(compositor_frame_sink); |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 bool ProxyImpl::IsMainThreadBlocked() const { | 605 bool ProxyImpl::IsMainThreadBlocked() const { |
605 return task_runner_provider_->IsMainThreadBlocked(); | 606 return task_runner_provider_->IsMainThreadBlocked(); |
606 } | 607 } |
607 | 608 |
608 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 609 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
609 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 610 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
610 return main_thread_blocked_commit_vars_unsafe_; | 611 return main_thread_blocked_commit_vars_unsafe_; |
611 } | 612 } |
612 | 613 |
613 } // namespace cc | 614 } // namespace cc |
OLD | NEW |