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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 impl().proxy_main_weak_ptr, success, capabilities)); | 247 impl().proxy_main_weak_ptr, success, capabilities)); |
248 } | 248 } |
249 | 249 |
250 void ThreadedChannel::DidCompletePageScaleAnimation() { | 250 void ThreadedChannel::DidCompletePageScaleAnimation() { |
251 DCHECK(IsImplThread()); | 251 DCHECK(IsImplThread()); |
252 MainThreadTaskRunner()->PostTask( | 252 MainThreadTaskRunner()->PostTask( |
253 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation, | 253 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation, |
254 impl().proxy_main_weak_ptr)); | 254 impl().proxy_main_weak_ptr)); |
255 } | 255 } |
256 | 256 |
257 void ThreadedChannel::PostFrameTimingEventsOnMain( | |
258 std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | |
259 std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | |
260 DCHECK(IsImplThread()); | |
261 MainThreadTaskRunner()->PostTask( | |
262 FROM_HERE, base::Bind(&ProxyMain::PostFrameTimingEventsOnMain, | |
263 impl().proxy_main_weak_ptr, | |
264 base::Passed(std::move(composite_events)), | |
265 base::Passed(std::move(main_frame_events)))); | |
266 } | |
267 | |
268 void ThreadedChannel::BeginMainFrame( | 257 void ThreadedChannel::BeginMainFrame( |
269 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { | 258 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) { |
270 DCHECK(IsImplThread()); | 259 DCHECK(IsImplThread()); |
271 MainThreadTaskRunner()->PostTask( | 260 MainThreadTaskRunner()->PostTask( |
272 FROM_HERE, | 261 FROM_HERE, |
273 base::Bind(&ProxyMain::BeginMainFrame, impl().proxy_main_weak_ptr, | 262 base::Bind(&ProxyMain::BeginMainFrame, impl().proxy_main_weak_ptr, |
274 base::Passed(&begin_main_frame_state))); | 263 base::Passed(&begin_main_frame_state))); |
275 } | 264 } |
276 | 265 |
277 std::unique_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl( | 266 std::unique_ptr<ProxyImpl> ThreadedChannel::CreateProxyImpl( |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 343 |
355 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} | 344 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} |
356 | 345 |
357 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( | 346 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( |
358 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) | 347 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) |
359 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} | 348 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} |
360 | 349 |
361 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} | 350 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} |
362 | 351 |
363 } // namespace cc | 352 } // namespace cc |
OLD | NEW |