OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ |
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ | 6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "blimp/client/blimp_client_export.h" | |
14 #include "blimp/client/feature/compositor/blimp_input_manager.h" | 13 #include "blimp/client/feature/compositor/blimp_input_manager.h" |
15 #include "cc/trees/layer_tree_host.h" | 14 #include "cc/trees/layer_tree_host.h" |
16 #include "cc/trees/layer_tree_host_client.h" | 15 #include "cc/trees/layer_tree_host_client.h" |
17 #include "cc/trees/layer_tree_settings.h" | 16 #include "cc/trees/layer_tree_settings.h" |
18 #include "cc/trees/remote_proto_channel.h" | 17 #include "cc/trees/remote_proto_channel.h" |
19 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
20 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // thread. Any interaction with the compositing thread should happen through | 77 // thread. Any interaction with the compositing thread should happen through |
79 // the LayerTreeHost. | 78 // the LayerTreeHost. |
80 // | 79 // |
81 // The Blimp compositor owns the remote client cc::LayerTreeHost, which performs | 80 // The Blimp compositor owns the remote client cc::LayerTreeHost, which performs |
82 // the compositing work for the remote server LayerTreeHost. The server | 81 // the compositing work for the remote server LayerTreeHost. The server |
83 // LayerTreeHost for a BlimpCompositor is owned by the | 82 // LayerTreeHost for a BlimpCompositor is owned by the |
84 // content::RenderWidgetCompositor. Thus, each BlimpCompositor is tied to a | 83 // content::RenderWidgetCompositor. Thus, each BlimpCompositor is tied to a |
85 // RenderWidget, identified by a custom |render_widget_id| generated on the | 84 // RenderWidget, identified by a custom |render_widget_id| generated on the |
86 // engine. The lifetime of this compositor is controlled by its corresponding | 85 // engine. The lifetime of this compositor is controlled by its corresponding |
87 // RenderWidget. | 86 // RenderWidget. |
88 class BLIMP_CLIENT_EXPORT BlimpCompositor | 87 class BlimpCompositor |
89 : public cc::LayerTreeHostClient, | 88 : public cc::LayerTreeHostClient, |
90 public cc::RemoteProtoChannel, | 89 public cc::RemoteProtoChannel, |
91 public BlimpInputManagerClient { | 90 public BlimpInputManagerClient { |
92 public: | 91 public: |
93 BlimpCompositor(const int render_widget_id, BlimpCompositorClient* client); | 92 BlimpCompositor(const int render_widget_id, BlimpCompositorClient* client); |
94 | 93 |
95 ~BlimpCompositor() override; | 94 ~BlimpCompositor() override; |
96 | 95 |
97 // Sets whether or not this compositor actually draws to the output surface. | 96 // Sets whether or not this compositor actually draws to the output surface. |
98 // Setting this to false will make the compositor drop all of its resources | 97 // Setting this to false will make the compositor drop all of its resources |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // widget. | 206 // widget. |
208 std::unique_ptr<BlimpInputManager> input_manager_; | 207 std::unique_ptr<BlimpInputManager> input_manager_; |
209 | 208 |
210 DISALLOW_COPY_AND_ASSIGN(BlimpCompositor); | 209 DISALLOW_COPY_AND_ASSIGN(BlimpCompositor); |
211 }; | 210 }; |
212 | 211 |
213 } // namespace client | 212 } // namespace client |
214 } // namespace blimp | 213 } // namespace blimp |
215 | 214 |
216 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ | 215 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ |
OLD | NEW |