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

Side by Side Diff: cc/test/proxy_main_for_test.h

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings::ToProtobuf, update comments. 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
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 #ifndef CC_TEST_PROXY_MAIN_FOR_TEST_H_ 5 #ifndef CC_TEST_PROXY_MAIN_FOR_TEST_H_
6 #define CC_TEST_PROXY_MAIN_FOR_TEST_H_ 6 #define CC_TEST_PROXY_MAIN_FOR_TEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/test/test_hooks.h" 9 #include "cc/test/test_hooks.h"
10 #include "cc/trees/proxy_main.h" 10 #include "cc/trees/proxy_main.h"
11 11
12 namespace cc { 12 namespace cc {
13 class ThreadedChannelForTest;
13 14
14 // Creates a ProxyMain that notifies the supplied |test_hooks| of various 15 // Creates a ProxyMain that notifies the supplied |test_hooks| of various
15 // actions. 16 // actions.
16 class ProxyMainForTest : public ProxyMain { 17 class ProxyMainForTest : public ProxyMain {
17 public: 18 public:
18 static scoped_ptr<ProxyMain> CreateThreaded( 19 static scoped_ptr<ProxyMainForTest> CreateThreaded(
19 TestHooks* test_hooks, 20 TestHooks* test_hooks,
20 LayerTreeHost* host, 21 LayerTreeHost* host,
21 TaskRunnerProvider* task_runner_provider, 22 TaskRunnerProvider* task_runner_provider,
22 scoped_ptr<BeginFrameSource> external_begin_frame_source); 23 scoped_ptr<BeginFrameSource> external_begin_frame_source);
23 24
25 static scoped_ptr<ProxyMainForTest> CreateRemote(
26 TestHooks* test_hooks,
27 RemoteProtoChannel* remote_proto_channel,
28 LayerTreeHost* host,
29 TaskRunnerProvider* task_runner_provider);
30
24 ~ProxyMainForTest() override; 31 ~ProxyMainForTest() override;
25 32
26 ProxyMainForTest(TestHooks* test_hooks, 33 ProxyMainForTest(TestHooks* test_hooks,
27 LayerTreeHost* host, 34 LayerTreeHost* host,
28 TaskRunnerProvider* task_runner_provider, 35 TaskRunnerProvider* task_runner_provider,
29 scoped_ptr<BeginFrameSource> external_begin_frame_source); 36 scoped_ptr<BeginFrameSource> external_begin_frame_source);
30 37
38 ThreadedChannelForTest* threaded_channel_for_test() const {
39 return threaded_channel_for_test_;
40 }
41
31 void SetNeedsUpdateLayers() override; 42 void SetNeedsUpdateLayers() override;
32 void DidCompleteSwapBuffers() override; 43 void DidCompleteSwapBuffers() override;
33 void SetRendererCapabilities( 44 void SetRendererCapabilities(
34 const RendererCapabilities& capabilities) override; 45 const RendererCapabilities& capabilities) override;
35 void BeginMainFrameNotExpectedSoon() override; 46 void BeginMainFrameNotExpectedSoon() override;
36 void DidCommitAndDrawFrame() override; 47 void DidCommitAndDrawFrame() override;
37 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) override; 48 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) override;
38 void DidLoseOutputSurface() override; 49 void DidLoseOutputSurface() override;
39 void RequestNewOutputSurface() override; 50 void RequestNewOutputSurface() override;
40 void DidInitializeOutputSurface( 51 void DidInitializeOutputSurface(
41 bool success, 52 bool success,
42 const RendererCapabilities& capabilities) override; 53 const RendererCapabilities& capabilities) override;
43 void DidCompletePageScaleAnimation() override; 54 void DidCompletePageScaleAnimation() override;
44 void PostFrameTimingEventsOnMain( 55 void PostFrameTimingEventsOnMain(
45 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 56 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
46 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) 57 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
47 override; 58 override;
48 void BeginMainFrame( 59 void BeginMainFrame(
49 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; 60 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
50 61
51 TestHooks* test_hooks_; 62 TestHooks* test_hooks_;
63 ThreadedChannelForTest* threaded_channel_for_test_;
52 }; 64 };
53 65
54 } // namespace cc 66 } // namespace cc
55 67
56 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ 68 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698