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

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

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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') | components/html_viewer/web_layer_tree_view_impl.h » ('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/layer_tree_mutator.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 25 matching lines...) Expand all
45 } 46 }
46 47
47 void ThreadedChannel::InitializeOutputSurfaceOnImpl( 48 void ThreadedChannel::InitializeOutputSurfaceOnImpl(
48 OutputSurface* output_surface) { 49 OutputSurface* output_surface) {
49 DCHECK(IsMainThread()); 50 DCHECK(IsMainThread());
50 ImplThreadTaskRunner()->PostTask( 51 ImplThreadTaskRunner()->PostTask(
51 FROM_HERE, base::Bind(&ProxyImpl::InitializeOutputSurfaceOnImpl, 52 FROM_HERE, base::Bind(&ProxyImpl::InitializeOutputSurfaceOnImpl,
52 proxy_impl_weak_ptr_, output_surface)); 53 proxy_impl_weak_ptr_, output_surface));
53 } 54 }
54 55
56 void ThreadedChannel::InitializeMutatorOnImpl(LayerTreeMutator* mutator) {
57 ImplThreadTaskRunner()->PostTask(
58 FROM_HERE, base::Bind(&ProxyImpl::InitializeMutatorOnImpl,
59 proxy_impl_weak_ptr_, mutator));
60 }
61
55 void ThreadedChannel::MainThreadHasStoppedFlingingOnImpl() { 62 void ThreadedChannel::MainThreadHasStoppedFlingingOnImpl() {
56 DCHECK(IsMainThread()); 63 DCHECK(IsMainThread());
57 ImplThreadTaskRunner()->PostTask( 64 ImplThreadTaskRunner()->PostTask(
58 FROM_HERE, base::Bind(&ProxyImpl::MainThreadHasStoppedFlingingOnImpl, 65 FROM_HERE, base::Bind(&ProxyImpl::MainThreadHasStoppedFlingingOnImpl,
59 proxy_impl_weak_ptr_)); 66 proxy_impl_weak_ptr_));
60 } 67 }
61 68
62 void ThreadedChannel::SetInputThrottledUntilCommitOnImpl(bool is_throttled) { 69 void ThreadedChannel::SetInputThrottledUntilCommitOnImpl(bool is_throttled) {
63 DCHECK(IsMainThread()); 70 DCHECK(IsMainThread());
64 ImplThreadTaskRunner()->PostTask( 71 ImplThreadTaskRunner()->PostTask(
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 369
363 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} 370 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {}
364 371
365 scoped_ptr<ThreadedChannel> ThreadedChannel::Create( 372 scoped_ptr<ThreadedChannel> ThreadedChannel::Create(
366 ProxyMain* proxy_main, 373 ProxyMain* proxy_main,
367 TaskRunnerProvider* task_runner_provider) { 374 TaskRunnerProvider* task_runner_provider) {
368 return make_scoped_ptr(new ThreadedChannel(proxy_main, task_runner_provider)); 375 return make_scoped_ptr(new ThreadedChannel(proxy_main, task_runner_provider));
369 } 376 }
370 377
371 } // namespace cc 378 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | components/html_viewer/web_layer_tree_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698