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/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/animation/animation_events.h" | 10 #include "cc/animation/animation_events.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 .proxy_main_weak_factory.GetWeakPtr()) { | 27 .proxy_main_weak_factory.GetWeakPtr()) { |
28 DCHECK(IsMainThread()); | 28 DCHECK(IsMainThread()); |
29 } | 29 } |
30 | 30 |
31 ThreadedChannel::~ThreadedChannel() { | 31 ThreadedChannel::~ThreadedChannel() { |
32 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); | 32 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); |
33 DCHECK(IsMainThread()); | 33 DCHECK(IsMainThread()); |
34 DCHECK(!IsInitialized()); | 34 DCHECK(!IsInitialized()); |
35 } | 35 } |
36 | 36 |
37 void ThreadedChannel::SetThrottleFrameProductionOnImpl(bool throttle) { | |
38 DCHECK(IsMainThread()); | |
39 ImplThreadTaskRunner()->PostTask( | |
40 FROM_HERE, base::Bind(&ProxyImpl::SetThrottleFrameProductionOnImpl, | |
41 proxy_impl_weak_ptr_, throttle)); | |
42 } | |
43 | |
44 void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 37 void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
45 TopControlsState current, | 38 TopControlsState current, |
46 bool animate) { | 39 bool animate) { |
47 DCHECK(IsMainThread()); | 40 DCHECK(IsMainThread()); |
48 ImplThreadTaskRunner()->PostTask( | 41 ImplThreadTaskRunner()->PostTask( |
49 FROM_HERE, | 42 FROM_HERE, |
50 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_, | 43 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_, |
51 constraints, current, animate)); | 44 constraints, current, animate)); |
52 } | 45 } |
53 | 46 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 351 |
359 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} | 352 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} |
360 | 353 |
361 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( | 354 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( |
362 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) | 355 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) |
363 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} | 356 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} |
364 | 357 |
365 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} | 358 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} |
366 | 359 |
367 } // namespace cc | 360 } // namespace cc |
OLD | NEW |