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

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

Issue 2340143002: cc: Rename LayerTreeHost to LayerTreeHostInProcess. (Closed)
Patch Set: comment fix Created 4 years, 3 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/proxy_main.h ('k') | cc/trees/remote_channel_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/proxy_main.h" 5 #include "cc/trees/proxy_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "base/trace_event/trace_event_argument.h" 11 #include "base/trace_event/trace_event_argument.h"
12 #include "base/trace_event/trace_event_synthetic_delay.h" 12 #include "base/trace_event/trace_event_synthetic_delay.h"
13 #include "cc/animation/animation_events.h" 13 #include "cc/animation/animation_events.h"
14 #include "cc/debug/benchmark_instrumentation.h" 14 #include "cc/debug/benchmark_instrumentation.h"
15 #include "cc/debug/devtools_instrumentation.h" 15 #include "cc/debug/devtools_instrumentation.h"
16 #include "cc/output/compositor_frame_sink.h" 16 #include "cc/output/compositor_frame_sink.h"
17 #include "cc/output/swap_promise.h" 17 #include "cc/output/swap_promise.h"
18 #include "cc/resources/ui_resource_manager.h" 18 #include "cc/resources/ui_resource_manager.h"
19 #include "cc/trees/blocking_task_runner.h" 19 #include "cc/trees/blocking_task_runner.h"
20 #include "cc/trees/layer_tree_host.h" 20 #include "cc/trees/layer_tree_host_in_process.h"
21 #include "cc/trees/remote_channel_main.h" 21 #include "cc/trees/remote_channel_main.h"
22 #include "cc/trees/scoped_abort_remaining_swap_promises.h" 22 #include "cc/trees/scoped_abort_remaining_swap_promises.h"
23 #include "cc/trees/threaded_channel.h" 23 #include "cc/trees/threaded_channel.h"
24 24
25 namespace cc { 25 namespace cc {
26 26
27 std::unique_ptr<ProxyMain> ProxyMain::CreateThreaded( 27 std::unique_ptr<ProxyMain> ProxyMain::CreateThreaded(
28 LayerTreeHost* layer_tree_host, 28 LayerTreeHostInProcess* layer_tree_host,
29 TaskRunnerProvider* task_runner_provider) { 29 TaskRunnerProvider* task_runner_provider) {
30 std::unique_ptr<ProxyMain> proxy_main( 30 std::unique_ptr<ProxyMain> proxy_main(
31 new ProxyMain(layer_tree_host, task_runner_provider)); 31 new ProxyMain(layer_tree_host, task_runner_provider));
32 proxy_main->SetChannel( 32 proxy_main->SetChannel(
33 ThreadedChannel::Create(proxy_main.get(), task_runner_provider)); 33 ThreadedChannel::Create(proxy_main.get(), task_runner_provider));
34 return proxy_main; 34 return proxy_main;
35 } 35 }
36 36
37 std::unique_ptr<ProxyMain> ProxyMain::CreateRemote( 37 std::unique_ptr<ProxyMain> ProxyMain::CreateRemote(
38 RemoteProtoChannel* remote_proto_channel, 38 RemoteProtoChannel* remote_proto_channel,
39 LayerTreeHost* layer_tree_host, 39 LayerTreeHostInProcess* layer_tree_host,
40 TaskRunnerProvider* task_runner_provider) { 40 TaskRunnerProvider* task_runner_provider) {
41 std::unique_ptr<ProxyMain> proxy_main( 41 std::unique_ptr<ProxyMain> proxy_main(
42 new ProxyMain(layer_tree_host, task_runner_provider)); 42 new ProxyMain(layer_tree_host, task_runner_provider));
43 proxy_main->SetChannel(RemoteChannelMain::Create( 43 proxy_main->SetChannel(RemoteChannelMain::Create(
44 remote_proto_channel, proxy_main.get(), task_runner_provider)); 44 remote_proto_channel, proxy_main.get(), task_runner_provider));
45 return proxy_main; 45 return proxy_main;
46 } 46 }
47 47
48 ProxyMain::ProxyMain(LayerTreeHost* layer_tree_host, 48 ProxyMain::ProxyMain(LayerTreeHostInProcess* layer_tree_host,
49 TaskRunnerProvider* task_runner_provider) 49 TaskRunnerProvider* task_runner_provider)
50 : layer_tree_host_(layer_tree_host), 50 : layer_tree_host_(layer_tree_host),
51 task_runner_provider_(task_runner_provider), 51 task_runner_provider_(task_runner_provider),
52 layer_tree_host_id_(layer_tree_host->GetId()), 52 layer_tree_host_id_(layer_tree_host->GetId()),
53 max_requested_pipeline_stage_(NO_PIPELINE_STAGE), 53 max_requested_pipeline_stage_(NO_PIPELINE_STAGE),
54 current_pipeline_stage_(NO_PIPELINE_STAGE), 54 current_pipeline_stage_(NO_PIPELINE_STAGE),
55 final_pipeline_stage_(NO_PIPELINE_STAGE), 55 final_pipeline_stage_(NO_PIPELINE_STAGE),
56 commit_waits_for_activation_(false), 56 commit_waits_for_activation_(false),
57 started_(false), 57 started_(false),
58 defer_commits_(false) { 58 defer_commits_(false) {
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return false; 423 return false;
424 channel_main_->SetNeedsCommitOnImpl(); 424 channel_main_->SetNeedsCommitOnImpl();
425 return true; 425 return true;
426 } 426 }
427 427
428 bool ProxyMain::IsMainThread() const { 428 bool ProxyMain::IsMainThread() const {
429 return task_runner_provider_->IsMainThread(); 429 return task_runner_provider_->IsMainThread();
430 } 430 }
431 431
432 } // namespace cc 432 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698