Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: cc/trees/threaded_channel.cc

Issue 1584743002: CC Animation: Replace AnimiationEventsVector with AnimiationEvents class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/trees/layer_tree_host.h" 11 #include "cc/trees/layer_tree_host.h"
11 12
12 namespace cc { 13 namespace cc {
13 14
14 ThreadedChannel::ThreadedChannel(ProxyMain* proxy_main, 15 ThreadedChannel::ThreadedChannel(ProxyMain* proxy_main,
15 TaskRunnerProvider* task_runner_provider) 16 TaskRunnerProvider* task_runner_provider)
16 : task_runner_provider_(task_runner_provider), 17 : task_runner_provider_(task_runner_provider),
17 main_thread_only_vars_unsafe_(proxy_main), 18 main_thread_only_vars_unsafe_(proxy_main),
18 compositor_thread_vars_unsafe_( 19 compositor_thread_vars_unsafe_(
19 main() 20 main()
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 impl().proxy_main_weak_ptr)); 208 impl().proxy_main_weak_ptr));
208 } 209 }
209 210
210 void ThreadedChannel::DidCommitAndDrawFrame() { 211 void ThreadedChannel::DidCommitAndDrawFrame() {
211 DCHECK(IsImplThread()); 212 DCHECK(IsImplThread());
212 MainThreadTaskRunner()->PostTask(FROM_HERE, 213 MainThreadTaskRunner()->PostTask(FROM_HERE,
213 base::Bind(&ProxyMain::DidCommitAndDrawFrame, 214 base::Bind(&ProxyMain::DidCommitAndDrawFrame,
214 impl().proxy_main_weak_ptr)); 215 impl().proxy_main_weak_ptr));
215 } 216 }
216 217
217 void ThreadedChannel::SetAnimationEvents( 218 void ThreadedChannel::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
218 scoped_ptr<AnimationEventsVector> queue) {
219 DCHECK(IsImplThread()); 219 DCHECK(IsImplThread());
220 MainThreadTaskRunner()->PostTask( 220 MainThreadTaskRunner()->PostTask(
221 FROM_HERE, base::Bind(&ProxyMain::SetAnimationEvents, 221 FROM_HERE, base::Bind(&ProxyMain::SetAnimationEvents,
222 impl().proxy_main_weak_ptr, base::Passed(&queue))); 222 impl().proxy_main_weak_ptr, base::Passed(&events)));
223 } 223 }
224 224
225 void ThreadedChannel::DidLoseOutputSurface() { 225 void ThreadedChannel::DidLoseOutputSurface() {
226 DCHECK(IsImplThread()); 226 DCHECK(IsImplThread());
227 MainThreadTaskRunner()->PostTask( 227 MainThreadTaskRunner()->PostTask(
228 FROM_HERE, 228 FROM_HERE,
229 base::Bind(&ProxyMain::DidLoseOutputSurface, impl().proxy_main_weak_ptr)); 229 base::Bind(&ProxyMain::DidLoseOutputSurface, impl().proxy_main_weak_ptr));
230 } 230 }
231 231
232 void ThreadedChannel::RequestNewOutputSurface() { 232 void ThreadedChannel::RequestNewOutputSurface() {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} 363 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {}
364 364
365 scoped_ptr<ThreadedChannel> ThreadedChannel::Create( 365 scoped_ptr<ThreadedChannel> ThreadedChannel::Create(
366 ProxyMain* proxy_main, 366 ProxyMain* proxy_main,
367 TaskRunnerProvider* task_runner_provider) { 367 TaskRunnerProvider* task_runner_provider) {
368 return make_scoped_ptr(new ThreadedChannel(proxy_main, task_runner_provider)); 368 return make_scoped_ptr(new ThreadedChannel(proxy_main, task_runner_provider));
369 } 369 }
370 370
371 } // namespace cc 371 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698