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

Side by Side Diff: blimp/client/feature/compositor/blimp_compositor_manager.h

Issue 1955493002: Move BlimpImageSerializationProcessor and WebPDecoder to //blimp/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "blimp/client/feature/compositor/blimp_compositor.h" 9 #include "blimp/client/feature/compositor/blimp_compositor.h"
10 #include "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h" 10 #include "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h"
11 #include "blimp/client/feature/render_widget_feature.h" 11 #include "blimp/client/feature/render_widget_feature.h"
12 #include "cc/trees/layer_tree_settings.h" 12 #include "cc/trees/layer_tree_settings.h"
13 13
14 namespace blimp { 14 namespace blimp {
15 namespace client { 15 namespace client {
16 16
Kevin M 2016/05/05 19:34:40 Add forward declaration for ClientImageSerializati
nyquist 2016/05/05 21:26:08 Done.
17 class BlimpCompositorManagerClient { 17 class BlimpCompositorManagerClient {
18 public: 18 public:
19 virtual void OnSwapBuffersCompleted() = 0; 19 virtual void OnSwapBuffersCompleted() = 0;
20 }; 20 };
21 21
22 // The BlimpCompositorManager manages multiple BlimpCompositor instances, each 22 // The BlimpCompositorManager manages multiple BlimpCompositor instances, each
23 // mapped to a render widget on the engine. The compositor corresponding to 23 // mapped to a render widget on the engine. The compositor corresponding to
24 // the render widget initialized on the engine will be the |active_compositor_|. 24 // the render widget initialized on the engine will be the |active_compositor_|.
25 // Only the |active_compositor_| holds the accelerated widget and builds the 25 // Only the |active_compositor_| holds the accelerated widget and builds the
26 // output surface from this widget to draw to the view. All events from the 26 // output surface from this widget to draw to the view. All events from the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 bool visible_; 84 bool visible_;
85 85
86 gfx::AcceleratedWidget window_; 86 gfx::AcceleratedWidget window_;
87 87
88 std::unique_ptr<cc::LayerTreeSettings> settings_; 88 std::unique_ptr<cc::LayerTreeSettings> settings_;
89 89
90 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_; 90 std::unique_ptr<BlimpGpuMemoryBufferManager> gpu_memory_buffer_manager_;
91 91
92 // Provides the functionality to deserialize images in SkPicture. 92 // Provides the functionality to deserialize images in SkPicture.
93 std::unique_ptr<BlimpImageSerializationProcessor> 93 std::unique_ptr<ClientImageSerializationProcessor>
94 image_serialization_processor_; 94 image_serialization_processor_;
95 95
96 // A map of render_widget_ids to the BlimpCompositor instance. 96 // A map of render_widget_ids to the BlimpCompositor instance.
97 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap; 97 typedef std::map<int, std::unique_ptr<BlimpCompositor>> CompositorMap;
98 CompositorMap compositors_; 98 CompositorMap compositors_;
99 99
100 // The |active_compositor_| represents the compositor from the CompositorMap 100 // The |active_compositor_| represents the compositor from the CompositorMap
101 // that is currently visible and has the |window_|. It corresponds to the 101 // that is currently visible and has the |window_|. It corresponds to the
102 // render widget currently initialized on the engine. 102 // render widget currently initialized on the engine.
103 BlimpCompositor* active_compositor_; 103 BlimpCompositor* active_compositor_;
104 104
105 // Lazily created thread that will run the compositor rendering tasks and will 105 // Lazily created thread that will run the compositor rendering tasks and will
106 // be shared by all compositor instances. 106 // be shared by all compositor instances.
107 std::unique_ptr<base::Thread> compositor_thread_; 107 std::unique_ptr<base::Thread> compositor_thread_;
108 108
109 // The bridge to the network layer that does the proto/RenderWidget id work. 109 // The bridge to the network layer that does the proto/RenderWidget id work.
110 // BlimpCompositorManager does not own this and it is expected to outlive this 110 // BlimpCompositorManager does not own this and it is expected to outlive this
111 // BlimpCompositorManager instance. 111 // BlimpCompositorManager instance.
112 RenderWidgetFeature* render_widget_feature_; 112 RenderWidgetFeature* render_widget_feature_;
113 BlimpCompositorManagerClient* client_; 113 BlimpCompositorManagerClient* client_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager); 115 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManager);
116 }; 116 };
117 117
118 } // namespace client 118 } // namespace client
119 } // namespace blimp 119 } // namespace blimp
120 120
121 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_ 121 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698