Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |