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

Side by Side Diff: cc/test/remote_channel_impl_for_test.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/test/remote_channel_impl_for_test.h"
6
7 #include "cc/test/proxy_impl_for_test.h"
8
9 namespace cc {
10
11 scoped_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create(
12 TestHooks* test_hooks,
13 LayerTreeHost* layer_tree_host,
14 RemoteProtoChannel* remote_proto_channel,
15 TaskRunnerProvider* task_runner_provider) {
16 return make_scoped_ptr(new RemoteChannelImplForTest(
17 test_hooks, layer_tree_host, remote_proto_channel, task_runner_provider));
18 }
19
20 RemoteChannelImplForTest::RemoteChannelImplForTest(
21 TestHooks* test_hooks,
22 LayerTreeHost* layer_tree_host,
23 RemoteProtoChannel* remote_proto_channel,
24 TaskRunnerProvider* task_runner_provider)
25 : RemoteChannelImpl(layer_tree_host,
26 remote_proto_channel,
27 task_runner_provider),
28 test_hooks_(test_hooks),
29 proxy_impl_for_test_(nullptr) {}
30
31 scoped_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl(
32 ChannelImpl* channel_impl,
33 LayerTreeHost* layer_tree_host,
34 TaskRunnerProvider* task_runner_provider,
35 scoped_ptr<BeginFrameSource> external_begin_frame_source) {
36 scoped_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create(
37 test_hooks_, channel_impl, layer_tree_host, task_runner_provider,
38 std::move(external_begin_frame_source));
39 proxy_impl_for_test_ = proxy_impl.get();
40 return std::move(proxy_impl);
ericrk 2016/01/20 22:32:29 nit: from what I remember, std::move breaks RVO, s
Khushal 2016/01/22 01:03:24 We need std::move here since the return needs to u
ericrk 2016/01/22 18:36:59 oh, true, missed that.
41 }
42
43 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698