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

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

Issue 1417053005: cc: Split ThreadProxy into ProxyMain and ProxyImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 #include "cc/layers/layer.h" 34 #include "cc/layers/layer.h"
35 #include "cc/layers/layer_iterator.h" 35 #include "cc/layers/layer_iterator.h"
36 #include "cc/layers/painted_scrollbar_layer.h" 36 #include "cc/layers/painted_scrollbar_layer.h"
37 #include "cc/resources/ui_resource_request.h" 37 #include "cc/resources/ui_resource_request.h"
38 #include "cc/scheduler/begin_frame_source.h" 38 #include "cc/scheduler/begin_frame_source.h"
39 #include "cc/trees/draw_property_utils.h" 39 #include "cc/trees/draw_property_utils.h"
40 #include "cc/trees/layer_tree_host_client.h" 40 #include "cc/trees/layer_tree_host_client.h"
41 #include "cc/trees/layer_tree_host_common.h" 41 #include "cc/trees/layer_tree_host_common.h"
42 #include "cc/trees/layer_tree_host_impl.h" 42 #include "cc/trees/layer_tree_host_impl.h"
43 #include "cc/trees/layer_tree_impl.h" 43 #include "cc/trees/layer_tree_impl.h"
44 #include "cc/trees/proxy_main.h"
44 #include "cc/trees/single_thread_proxy.h" 45 #include "cc/trees/single_thread_proxy.h"
45 #include "cc/trees/thread_proxy.h" 46 #include "cc/trees/threaded_channel.h"
46 #include "cc/trees/tree_synchronizer.h" 47 #include "cc/trees/tree_synchronizer.h"
47 #include "ui/gfx/geometry/size_conversions.h" 48 #include "ui/gfx/geometry/size_conversions.h"
48 #include "ui/gfx/geometry/vector2d_conversions.h" 49 #include "ui/gfx/geometry/vector2d_conversions.h"
49 50
50 namespace { 51 namespace {
51 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number; 52 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number;
52 } 53 }
53 54
54 namespace cc { 55 namespace cc {
55 56
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 131 }
131 132
132 rendering_stats_instrumentation_->set_record_rendering_stats( 133 rendering_stats_instrumentation_->set_record_rendering_stats(
133 debug_state_.RecordRenderingStats()); 134 debug_state_.RecordRenderingStats());
134 } 135 }
135 136
136 void LayerTreeHost::InitializeThreaded( 137 void LayerTreeHost::InitializeThreaded(
137 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 138 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
138 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 139 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
139 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 140 scoped_ptr<BeginFrameSource> external_begin_frame_source) {
140 InitializeProxy(ThreadProxy::Create(this, 141 scoped_ptr<ProxyMain> proxy_main =
141 main_task_runner, 142 ProxyMain::Create(this, main_task_runner, impl_task_runner,
142 impl_task_runner, 143 external_begin_frame_source.Pass());
143 external_begin_frame_source.Pass())); 144 scoped_ptr<ThreadedChannel> threaded_channel =
145 ThreadedChannel::Create(proxy_main.get());
146 proxy_main->SetChannel(threaded_channel.Pass());
147 InitializeProxy(proxy_main.Pass());
144 } 148 }
145 149
146 void LayerTreeHost::InitializeSingleThreaded( 150 void LayerTreeHost::InitializeSingleThreaded(
147 LayerTreeHostSingleThreadClient* single_thread_client, 151 LayerTreeHostSingleThreadClient* single_thread_client,
148 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 152 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
149 scoped_ptr<BeginFrameSource> external_begin_frame_source) { 153 scoped_ptr<BeginFrameSource> external_begin_frame_source) {
150 InitializeProxy( 154 InitializeProxy(
151 SingleThreadProxy::Create(this, 155 SingleThreadProxy::Create(this,
152 single_thread_client, 156 single_thread_client,
153 main_task_runner, 157 main_task_runner,
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) 1244 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id())
1241 : false; 1245 : false;
1242 } 1246 }
1243 1247
1244 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { 1248 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const {
1245 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) 1249 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id())
1246 : false; 1250 : false;
1247 } 1251 }
1248 1252
1249 } // namespace cc 1253 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698