| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 const cc::proto::CompositorMessage& message) override; | 86 const cc::proto::CompositorMessage& message) override; |
| 85 | 87 |
| 86 bool visible_; | 88 bool visible_; |
| 87 | 89 |
| 88 gfx::AcceleratedWidget window_; | 90 gfx::AcceleratedWidget window_; |
| 89 | 91 |
| 90 std::unique_ptr<cc::LayerTreeSettings> settings_; | 92 std::unique_ptr<cc::LayerTreeSettings> settings_; |
| 91 | 93 |
| 92 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 94 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
| 93 | 95 |
| 94 // Provides the functionality to deserialize images in SkPicture. | 96 // Provides the functionality to retrieve and decode images from the |
| 95 std::unique_ptr<ClientImageSerializationProcessor> | 97 // BlobChannel. |
| 96 image_serialization_processor_; | 98 ClientImageSerializationProcessor* image_serialization_processor_; |
| 97 | 99 |
| 98 // A map of render_widget_ids to the BlimpCompositor instance. | 100 // A map of render_widget_ids to the BlimpCompositor instance. |
| 99 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap; | 101 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap; |
| 100 CompositorMap compositors_; | 102 CompositorMap compositors_; |
| 101 | 103 |
| 102 // The |active_compositor_| represents the compositor from the CompositorMap | 104 // The |active_compositor_| represents the compositor from the CompositorMap |
| 103 // that is currently visible and has the |window_|. It corresponds to the | 105 // that is currently visible and has the |window_|. It corresponds to the |
| 104 // render widget currently initialized on the engine. | 106 // render widget currently initialized on the engine. |
| 105 BlimpCompositor* active_compositor_; | 107 BlimpCompositor* active_compositor_; |
| 106 | 108 |
| 107 // Lazily created thread that will run the compositor rendering tasks and will | 109 // Lazily created thread that will run the compositor rendering tasks and will |
| 108 // be shared by all compositor instances. | 110 // be shared by all compositor instances. |
| 109 std::unique_ptr<base::Thread> compositor_thread_; | 111 std::unique_ptr<base::Thread> compositor_thread_; |
| 110 | 112 |
| 111 // The bridge to the network layer that does the proto/RenderWidget id work. | 113 // The bridge to the network layer that does the proto/RenderWidget id work. |
| 112 // BlimpCompositorManager does not own this and it is expected to outlive this | 114 // BlimpCompositorManager does not own this and it is expected to outlive this |
| 113 // BlimpCompositorManager instance. | 115 // BlimpCompositorManager instance. |
| 114 RenderWidgetFeature* render_widget_feature_; | 116 RenderWidgetFeature* render_widget_feature_; |
| 115 BlimpCompositorManagerClient* client_; | 117 BlimpCompositorManagerClient* client_; |
| 116 | 118 |
| 117 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager); | 119 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager); |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 } // namespace client | 122 } // namespace client |
| 121 } // namespace blimp | 123 } // namespace blimp |
| 122 | 124 |
| 123 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ | 125 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ |
| OLD | NEW |