OLD | NEW |
---|---|
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 BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ |
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ | 6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ |
7 | 7 |
8 #include <map> | |
9 | |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "blimp/client/feature/compositor/blimp_compositor.h" | 11 #include "blimp/client/feature/compositor/blimp_compositor.h" |
10 #include "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h" | 12 #include "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h" |
11 #include "blimp/client/feature/render_widget_feature.h" | 13 #include "blimp/client/feature/render_widget_feature.h" |
12 #include "cc/trees/layer_tree_settings.h" | 14 #include "cc/trees/layer_tree_settings.h" |
13 | 15 |
14 namespace blimp { | 16 namespace blimp { |
15 namespace client { | 17 namespace client { |
16 | 18 |
17 class ClientImageSerializationProcessor; | 19 class ClientImageSerializationProcessor; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 const cc::proto::CompositorMessage& message) override; | 88 const cc::proto::CompositorMessage& message) override; |
87 | 89 |
88 bool visible_; | 90 bool visible_; |
89 | 91 |
90 gfx::AcceleratedWidget window_; | 92 gfx::AcceleratedWidget window_; |
91 | 93 |
92 std::unique_ptr<cc::LayerTreeSettings> settings_; | 94 std::unique_ptr<cc::LayerTreeSettings> settings_; |
93 | 95 |
94 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 96 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
95 | 97 |
96 // Provides the functionality to deserialize images in SkPicture. | 98 // Retrieves and decode images from the BlobChannel. |
97 std::unique_ptr<ClientImageSerializationProcessor> | 99 ClientImageSerializationProcessor* image_serialization_processor_; |
nyquist
2016/06/03 18:30:44
Nit: Do we want to mention any thing about this be
Kevin M
2016/06/06 17:43:38
I'm not sure if that's necessary, given that the v
nyquist
2016/06/06 21:10:46
Nah, I agree.
| |
98 image_serialization_processor_; | |
99 | 100 |
100 // A map of render_widget_ids to the BlimpCompositor instance. | 101 // A map of render_widget_ids to the BlimpCompositor instance. |
101 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap; | 102 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap; |
102 CompositorMap compositors_; | 103 CompositorMap compositors_; |
103 | 104 |
104 // The |active_compositor_| represents the compositor from the CompositorMap | 105 // The |active_compositor_| represents the compositor from the CompositorMap |
105 // that is currently visible and has the |window_|. It corresponds to the | 106 // that is currently visible and has the |window_|. It corresponds to the |
106 // render widget currently initialized on the engine. | 107 // render widget currently initialized on the engine. |
107 BlimpCompositor* active_compositor_; | 108 BlimpCompositor* active_compositor_; |
108 | 109 |
109 // Lazily created thread that will run the compositor rendering tasks and will | 110 // Lazily created thread that will run the compositor rendering tasks and will |
110 // be shared by all compositor instances. | 111 // be shared by all compositor instances. |
111 std::unique_ptr<base::Thread> compositor_thread_; | 112 std::unique_ptr<base::Thread> compositor_thread_; |
112 | 113 |
113 // The bridge to the network layer that does the proto/RenderWidget id work. | 114 // The bridge to the network layer that does the proto/RenderWidget id work. |
114 // BlimpCompositorManager does not own this and it is expected to outlive this | 115 // BlimpCompositorManager does not own this and it is expected to outlive this |
115 // BlimpCompositorManager instance. | 116 // BlimpCompositorManager instance. |
116 RenderWidgetFeature* render_widget_feature_; | 117 RenderWidgetFeature* render_widget_feature_; |
117 BlimpCompositorManagerClient* client_; | 118 BlimpCompositorManagerClient* client_; |
118 | 119 |
119 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager); | 120 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager); |
120 }; | 121 }; |
121 | 122 |
122 } // namespace client | 123 } // namespace client |
123 } // namespace blimp | 124 } // namespace blimp |
124 | 125 |
125 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ | 126 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ |
OLD | NEW |