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_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ | 5 #ifndef BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ |
6 #define BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ | 6 #define BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
| 12 #include "cc/surfaces/frame_sink_id.h" |
12 #include "cc/trees/layer_tree_host_client.h" | 13 #include "cc/trees/layer_tree_host_client.h" |
13 #include "cc/trees/layer_tree_host_single_thread_client.h" | 14 #include "cc/trees/layer_tree_host_single_thread_client.h" |
14 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 class Display; | 18 class Display; |
18 class LayerTreeHost; | 19 class LayerTreeHost; |
19 class SurfaceIdAllocator; | |
20 class SurfaceManager; | 20 class SurfaceManager; |
21 } // namespace cc | 21 } // namespace cc |
22 | 22 |
23 namespace blimp { | 23 namespace blimp { |
24 namespace client { | 24 namespace client { |
25 class CompositorDependencies; | 25 class CompositorDependencies; |
26 | 26 |
27 // The parent compositor that embeds the content from the BlimpCompositor for | 27 // The parent compositor that embeds the content from the BlimpCompositor for |
28 // the current page and draws it to a display. | 28 // the current page and draws it to a display. |
29 class BlimpEmbedderCompositor : public cc::LayerTreeHostClient, | 29 class BlimpEmbedderCompositor : public cc::LayerTreeHostClient, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // LayerTreeHostSingleThreadClient implementation. | 70 // LayerTreeHostSingleThreadClient implementation. |
71 void DidPostSwapBuffers() override {} | 71 void DidPostSwapBuffers() override {} |
72 void DidAbortSwapBuffers() override {} | 72 void DidAbortSwapBuffers() override {} |
73 | 73 |
74 private: | 74 private: |
75 void HandlePendingCompositorFrameSinkRequest(); | 75 void HandlePendingCompositorFrameSinkRequest(); |
76 | 76 |
77 CompositorDependencies* compositor_dependencies_; | 77 CompositorDependencies* compositor_dependencies_; |
78 | 78 |
| 79 cc::FrameSinkId frame_sink_id_; |
| 80 |
79 scoped_refptr<cc::ContextProvider> context_provider_; | 81 scoped_refptr<cc::ContextProvider> context_provider_; |
80 | 82 |
81 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | |
82 bool compositor_frame_sink_request_pending_; | 83 bool compositor_frame_sink_request_pending_; |
83 std::unique_ptr<cc::Display> display_; | 84 std::unique_ptr<cc::Display> display_; |
84 | 85 |
85 gfx::Size viewport_size_in_px_; | 86 gfx::Size viewport_size_in_px_; |
86 | 87 |
87 std::unique_ptr<cc::LayerTreeHost> host_; | 88 std::unique_ptr<cc::LayerTreeHost> host_; |
88 scoped_refptr<cc::Layer> root_layer_; | 89 scoped_refptr<cc::Layer> root_layer_; |
89 | 90 |
90 base::Closure did_complete_swap_buffers_; | 91 base::Closure did_complete_swap_buffers_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(BlimpEmbedderCompositor); | 93 DISALLOW_COPY_AND_ASSIGN(BlimpEmbedderCompositor); |
93 }; | 94 }; |
94 | 95 |
95 } // namespace client | 96 } // namespace client |
96 } // namespace blimp | 97 } // namespace blimp |
97 | 98 |
98 #endif // BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ | 99 #endif // BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_EMBEDDER_COMPOSITOR_H_ |
OLD | NEW |