OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 #if defined(ENABLE_VULKAN) | 126 #if defined(ENABLE_VULKAN) |
127 void CreateVulkanOutputSurface(); | 127 void CreateVulkanOutputSurface(); |
128 #endif | 128 #endif |
129 void CreateCompositorOutputSurface( | 129 void CreateCompositorOutputSurface( |
130 const scoped_refptr<cc::ContextProvider>& context_provider); | 130 const scoped_refptr<cc::ContextProvider>& context_provider); |
131 void InitializeDisplay( | 131 void InitializeDisplay( |
132 std::unique_ptr<cc::OutputSurface> display_output_surface, | 132 std::unique_ptr<cc::OutputSurface> display_output_surface, |
133 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, | 133 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, |
134 scoped_refptr<cc::ContextProvider> context_provider); | 134 scoped_refptr<cc::ContextProvider> context_provider); |
135 | 135 |
| 136 bool HavePendingReadbacks(); |
| 137 |
136 // root_layer_ is the persistent internal root layer, while subroot_layer_ | 138 // root_layer_ is the persistent internal root layer, while subroot_layer_ |
137 // is the one attached by the compositor client. | 139 // is the one attached by the compositor client. |
138 scoped_refptr<cc::Layer> subroot_layer_; | 140 scoped_refptr<cc::Layer> subroot_layer_; |
139 | 141 |
| 142 // Subtree for hidden layers with CopyOutputRequests on them. |
| 143 scoped_refptr<cc::Layer> readback_layer_tree_; |
| 144 |
140 // Destruction order matters here: | 145 // Destruction order matters here: |
141 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 146 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
142 base::ObserverList<VSyncObserver, true> observer_list_; | 147 base::ObserverList<VSyncObserver, true> observer_list_; |
143 std::unique_ptr<cc::LayerTreeHost> host_; | 148 std::unique_ptr<cc::LayerTreeHost> host_; |
144 ui::ResourceManagerImpl resource_manager_; | 149 ui::ResourceManagerImpl resource_manager_; |
145 | 150 |
146 std::unique_ptr<cc::Display> display_; | 151 std::unique_ptr<cc::Display> display_; |
147 | 152 |
148 gfx::Size size_; | 153 gfx::Size size_; |
149 bool has_transparent_background_; | 154 bool has_transparent_background_; |
(...skipping 24 matching lines...) Expand all Loading... |
174 gpu::Capabilities gpu_capabilities_; | 179 gpu::Capabilities gpu_capabilities_; |
175 bool needs_begin_frames_; | 180 bool needs_begin_frames_; |
176 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 181 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
177 | 182 |
178 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 183 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
179 }; | 184 }; |
180 | 185 |
181 } // namespace content | 186 } // namespace content |
182 | 187 |
183 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 188 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |