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

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

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 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 2016 The Chromium Authors. All rights reserved. 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 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_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_ 5 #ifndef CC_TEST_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_
6 #define CC_TEST_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_ 6 #define CC_TEST_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/blimp/compositor_state_deserializer_client.h" 9 #include "cc/blimp/compositor_state_deserializer_client.h"
10 #include "cc/blimp/layer_tree_host_remote.h" 10 #include "cc/blimp/layer_tree_host_remote.h"
(...skipping 13 matching lines...) Expand all
24 // This is a version of LayerTreeHostRemote meant to be used for tests that want 24 // This is a version of LayerTreeHostRemote meant to be used for tests that want
25 // to inspect the CompositorFrame produced when state updates from the remote 25 // to inspect the CompositorFrame produced when state updates from the remote
26 // host are used by a compositor on the client. 26 // host are used by a compositor on the client.
27 class LayerTreeHostRemoteForTesting : public LayerTreeHostRemote, 27 class LayerTreeHostRemoteForTesting : public LayerTreeHostRemote,
28 public CompositorStateDeserializerClient { 28 public CompositorStateDeserializerClient {
29 public: 29 public:
30 static std::unique_ptr<LayerTreeHostRemoteForTesting> Create( 30 static std::unique_ptr<LayerTreeHostRemoteForTesting> Create(
31 LayerTreeHostClient* client, 31 LayerTreeHostClient* client,
32 std::unique_ptr<AnimationHost> animation_host, 32 std::unique_ptr<AnimationHost> animation_host,
33 LayerTreeSettings const* settings, 33 LayerTreeSettings const* settings,
34 SharedBitmapManager* shared_bitmap_manager,
35 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
36 TaskGraphRunner* task_graph_runner, 34 TaskGraphRunner* task_graph_runner,
37 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
38 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 36 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
39 37
40 static std::unique_ptr<RemoteCompositorBridge> CreateRemoteCompositorBridge( 38 static std::unique_ptr<RemoteCompositorBridge> CreateRemoteCompositorBridge(
41 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 39 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
42 40
43 ~LayerTreeHostRemoteForTesting() override; 41 ~LayerTreeHostRemoteForTesting() override;
44 42
45 // LayerTreeHost interface. 43 // LayerTreeHost interface.
46 void SetVisible(bool visible) override; 44 void SetVisible(bool visible) override;
47 void SetCompositorFrameSink( 45 void SetCompositorFrameSink(
48 std::unique_ptr<CompositorFrameSink> compositor_frame_sink) override; 46 std::unique_ptr<CompositorFrameSink> compositor_frame_sink) override;
49 std::unique_ptr<CompositorFrameSink> ReleaseCompositorFrameSink() override; 47 std::unique_ptr<CompositorFrameSink> ReleaseCompositorFrameSink() override;
50 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override; 48 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override;
51 void SetNextCommitForcesRedraw() override; 49 void SetNextCommitForcesRedraw() override;
52 void NotifyInputThrottledUntilCommit() override; 50 void NotifyInputThrottledUntilCommit() override;
53 const base::WeakPtr<InputHandler>& GetInputHandler() const override; 51 const base::WeakPtr<InputHandler>& GetInputHandler() const override;
54 52
55 LayerTreeHostInProcess* layer_tree_host_in_process() const { 53 LayerTreeHostInProcess* layer_tree_host_in_process() const {
56 return layer_tree_host_in_process_.get(); 54 return layer_tree_host_in_process_.get();
57 } 55 }
58 56
59 protected: 57 protected:
60 explicit LayerTreeHostRemoteForTesting(InitParams* params); 58 explicit LayerTreeHostRemoteForTesting(InitParams* params);
61 59
62 void Initialize(SharedBitmapManager* shared_bitmap_manager, 60 void Initialize(TaskGraphRunner* task_graph_runner,
63 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
64 TaskGraphRunner* task_graph_runner,
65 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 61 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
66 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 62 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
67 std::unique_ptr<FakeImageSerializationProcessor> 63 std::unique_ptr<FakeImageSerializationProcessor>
68 image_serialization_processor); 64 image_serialization_processor);
69 65
70 virtual std::unique_ptr<LayerTreeHostInProcess> CreateLayerTreeHostInProcess( 66 virtual std::unique_ptr<LayerTreeHostInProcess> CreateLayerTreeHostInProcess(
71 LayerTreeHostClient* client, 67 LayerTreeHostClient* client,
72 SharedBitmapManager* shared_bitmap_manager,
73 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
74 TaskGraphRunner* task_graph_runner, 68 TaskGraphRunner* task_graph_runner,
75 const LayerTreeSettings& settings, 69 const LayerTreeSettings& settings,
76 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 70 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
77 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 71 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
78 72
79 private: 73 private:
80 class LayerTreeHostInProcessClient; 74 class LayerTreeHostInProcessClient;
81 class RemoteCompositorBridgeImpl; 75 class RemoteCompositorBridgeImpl;
82 76
83 // CompositorStateDeserializerClient implementation. 77 // CompositorStateDeserializerClient implementation.
(...skipping 21 matching lines...) Expand all
105 99
106 std::unique_ptr<FakeImageSerializationProcessor> 100 std::unique_ptr<FakeImageSerializationProcessor>
107 image_serialization_processor_; 101 image_serialization_processor_;
108 102
109 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostRemoteForTesting); 103 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostRemoteForTesting);
110 }; 104 };
111 105
112 } // namespace cc 106 } // namespace cc
113 107
114 #endif // CC_TEST_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_ 108 #endif // CC_TEST_LAYER_TREE_HOST_REMOTE_FOR_TESTING_H_
OLDNEW
« no previous file with comments | « cc/test/fake_ui_resource_layer_tree_host_impl.cc ('k') | cc/test/layer_tree_host_remote_for_testing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698