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/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
12 #include "base/trace_event/trace_event_argument.h" | 12 #include "base/trace_event/trace_event_argument.h" |
13 #include "base/trace_event/trace_event_synthetic_delay.h" | 13 #include "base/trace_event/trace_event_synthetic_delay.h" |
| 14 #include "cc/animation/animation_events.h" |
14 #include "cc/debug/benchmark_instrumentation.h" | 15 #include "cc/debug/benchmark_instrumentation.h" |
15 #include "cc/debug/devtools_instrumentation.h" | 16 #include "cc/debug/devtools_instrumentation.h" |
16 #include "cc/input/top_controls_manager.h" | 17 #include "cc/input/top_controls_manager.h" |
17 #include "cc/output/context_provider.h" | 18 #include "cc/output/context_provider.h" |
18 #include "cc/output/output_surface.h" | 19 #include "cc/output/output_surface.h" |
19 #include "cc/scheduler/compositor_timing_history.h" | 20 #include "cc/scheduler/compositor_timing_history.h" |
20 #include "cc/trees/layer_tree_host.h" | 21 #include "cc/trees/layer_tree_host.h" |
21 #include "cc/trees/layer_tree_impl.h" | 22 #include "cc/trees/layer_tree_impl.h" |
22 #include "cc/trees/task_runner_provider.h" | 23 #include "cc/trees/task_runner_provider.h" |
23 #include "gpu/command_buffer/client/gles2_interface.h" | 24 #include "gpu/command_buffer/client/gles2_interface.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 void ProxyImpl::SetVideoNeedsBeginFrames(bool needs_begin_frames) { | 351 void ProxyImpl::SetVideoNeedsBeginFrames(bool needs_begin_frames) { |
351 TRACE_EVENT1("cc", "ProxyImpl::SetVideoNeedsBeginFrames", | 352 TRACE_EVENT1("cc", "ProxyImpl::SetVideoNeedsBeginFrames", |
352 "needs_begin_frames", needs_begin_frames); | 353 "needs_begin_frames", needs_begin_frames); |
353 DCHECK(IsImplThread()); | 354 DCHECK(IsImplThread()); |
354 // In tests the layer tree is destroyed after the scheduler is. | 355 // In tests the layer tree is destroyed after the scheduler is. |
355 if (scheduler_) | 356 if (scheduler_) |
356 scheduler_->SetVideoNeedsBeginFrames(needs_begin_frames); | 357 scheduler_->SetVideoNeedsBeginFrames(needs_begin_frames); |
357 } | 358 } |
358 | 359 |
359 void ProxyImpl::PostAnimationEventsToMainThreadOnImplThread( | 360 void ProxyImpl::PostAnimationEventsToMainThreadOnImplThread( |
360 scoped_ptr<AnimationEventsVector> events) { | 361 scoped_ptr<AnimationEvents> events) { |
361 TRACE_EVENT0("cc", "ProxyImpl::PostAnimationEventsToMainThreadOnImplThread"); | 362 TRACE_EVENT0("cc", "ProxyImpl::PostAnimationEventsToMainThreadOnImplThread"); |
362 DCHECK(IsImplThread()); | 363 DCHECK(IsImplThread()); |
363 channel_impl_->SetAnimationEvents(std::move(events)); | 364 channel_impl_->SetAnimationEvents(std::move(events)); |
364 } | 365 } |
365 | 366 |
366 bool ProxyImpl::IsInsideDraw() { | 367 bool ProxyImpl::IsInsideDraw() { |
367 return inside_draw_; | 368 return inside_draw_; |
368 } | 369 } |
369 | 370 |
370 void ProxyImpl::RenewTreePriority() { | 371 void ProxyImpl::RenewTreePriority() { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 bool ProxyImpl::IsMainThreadBlocked() const { | 671 bool ProxyImpl::IsMainThreadBlocked() const { |
671 return task_runner_provider_->IsMainThreadBlocked(); | 672 return task_runner_provider_->IsMainThreadBlocked(); |
672 } | 673 } |
673 | 674 |
674 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 675 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
675 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 676 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
676 return main_thread_blocked_commit_vars_unsafe_; | 677 return main_thread_blocked_commit_vars_unsafe_; |
677 } | 678 } |
678 | 679 |
679 } // namespace cc | 680 } // namespace cc |
OLD | NEW |