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

Side by Side Diff: cc/blimp/layer_tree_host_remote.h

Issue 2397843003: cc/blimp: Add (de)-serialization for PictureLayer and ScrollbarLayer. (Closed)
Patch Set: Addressed comments Created 4 years, 2 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/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote.cc » ('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 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_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 5 #ifndef CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
6 #define CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 6 #define CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/blimp/remote_compositor_bridge_client.h" 11 #include "cc/blimp/remote_compositor_bridge_client.h"
12 #include "cc/debug/layer_tree_debug_state.h" 12 #include "cc/debug/layer_tree_debug_state.h"
13 #include "cc/surfaces/surface_sequence_generator.h" 13 #include "cc/surfaces/surface_sequence_generator.h"
14 #include "cc/trees/layer_tree_host.h" 14 #include "cc/trees/layer_tree_host.h"
15 #include "cc/trees/layer_tree_settings.h" 15 #include "cc/trees/layer_tree_settings.h"
16 #include "cc/trees/swap_promise_manager.h" 16 #include "cc/trees/swap_promise_manager.h"
17 17
18 namespace base { 18 namespace base {
19 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
20 } // namespace base 20 } // namespace base
21 21
22 namespace cc { 22 namespace cc {
23 namespace proto { 23 namespace proto {
24 class LayerTreeHost; 24 class LayerTreeHost;
25 } // namespace proto 25 } // namespace proto
26 26
27 class AnimationHost; 27 class AnimationHost;
28 class EnginePictureCache;
29 class ImageSerializationProcessor;
28 class RemoteCompositorBridge; 30 class RemoteCompositorBridge;
29 class LayerTreeHostClient; 31 class LayerTreeHostClient;
30 32
31 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost, 33 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost,
32 public RemoteCompositorBridgeClient { 34 public RemoteCompositorBridgeClient {
33 public: 35 public:
34 struct CC_EXPORT InitParams { 36 struct CC_EXPORT InitParams {
35 LayerTreeHostClient* client = nullptr; 37 LayerTreeHostClient* client = nullptr;
36 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner; 38 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner;
37 std::unique_ptr<AnimationHost> animation_host; 39 std::unique_ptr<AnimationHost> animation_host;
38 std::unique_ptr<RemoteCompositorBridge> remote_compositor_bridge; 40 std::unique_ptr<RemoteCompositorBridge> remote_compositor_bridge;
41 std::unique_ptr<EnginePictureCache> engine_picture_cache;
39 LayerTreeSettings const* settings = nullptr; 42 LayerTreeSettings const* settings = nullptr;
40 43
41 InitParams(); 44 InitParams();
42 ~InitParams(); 45 ~InitParams();
43 }; 46 };
44 47
45 explicit LayerTreeHostRemote(InitParams* params); 48 explicit LayerTreeHostRemote(InitParams* params);
46 ~LayerTreeHostRemote() override; 49 ~LayerTreeHostRemote() override;
47 50
48 // LayerTreeHost implementation. 51 // LayerTreeHost implementation.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Set to the pipeline stage requested for the next BeginMainFrame. 134 // Set to the pipeline stage requested for the next BeginMainFrame.
132 FramePipelineStage requested_pipeline_stage_for_next_frame_ = 135 FramePipelineStage requested_pipeline_stage_for_next_frame_ =
133 FramePipelineStage::NONE; 136 FramePipelineStage::NONE;
134 137
135 LayerTreeHostClient* client_; 138 LayerTreeHostClient* client_;
136 std::unique_ptr<TaskRunnerProvider> task_runner_provider_; 139 std::unique_ptr<TaskRunnerProvider> task_runner_provider_;
137 140
138 // The RemoteCompositorBridge used to submit frame updates to the client. 141 // The RemoteCompositorBridge used to submit frame updates to the client.
139 std::unique_ptr<RemoteCompositorBridge> remote_compositor_bridge_; 142 std::unique_ptr<RemoteCompositorBridge> remote_compositor_bridge_;
140 143
144 // Used to cache SkPictures sent with DisplayLists to the client.
145 // TODO(khushalsagar): Restructure to give this with the CompositorProtoState
146 // and eliminate this abstraction. See crbug.com/648442.
147 std::unique_ptr<EnginePictureCache> engine_picture_cache_;
148
141 LayerTreeSettings settings_; 149 LayerTreeSettings settings_;
142 LayerTreeDebugState debug_state_; 150 LayerTreeDebugState debug_state_;
143 151
144 // The LayerTree holds the root layer and other state on the engine. 152 // The LayerTree holds the root layer and other state on the engine.
145 std::unique_ptr<LayerTree> layer_tree_; 153 std::unique_ptr<LayerTree> layer_tree_;
146 154
147 SwapPromiseManager swap_promise_manager_; 155 SwapPromiseManager swap_promise_manager_;
148 SurfaceSequenceGenerator surface_sequence_generator_; 156 SurfaceSequenceGenerator surface_sequence_generator_;
149 157
150 base::WeakPtr<InputHandler> input_handler_weak_ptr_; 158 base::WeakPtr<InputHandler> input_handler_weak_ptr_;
151 159
152 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_; 160 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_;
153 }; 161 };
154 162
155 } // namespace cc 163 } // namespace cc
156 164
157 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 165 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
OLDNEW
« no previous file with comments | « cc/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698