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> |
11 | 11 |
12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
18 #include "cc/surfaces/frame_sink_id.h" | 18 #include "cc/surfaces/frame_sink_id.h" |
19 #include "cc/trees/layer_tree_host_client.h" | 19 #include "cc/trees/layer_tree_host_client.h" |
20 #include "cc/trees/layer_tree_host_single_thread_client.h" | 20 #include "cc/trees/layer_tree_host_single_thread_client.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "content/public/browser/android/compositor.h" | 22 #include "content/public/browser/android/compositor.h" |
23 #include "gpu/command_buffer/common/capabilities.h" | 23 #include "gpu/command_buffer/common/capabilities.h" |
24 #include "gpu/ipc/common/surface_handle.h" | 24 #include "gpu/ipc/common/surface_handle.h" |
| 25 #include "gpu/vulkan/features.h" |
25 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" | 26 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
26 #include "third_party/khronos/GLES2/gl2.h" | 27 #include "third_party/khronos/GLES2/gl2.h" |
27 #include "ui/android/resources/resource_manager_impl.h" | 28 #include "ui/android/resources/resource_manager_impl.h" |
28 #include "ui/android/resources/ui_resource_provider.h" | 29 #include "ui/android/resources/ui_resource_provider.h" |
29 #include "ui/android/window_android_compositor.h" | 30 #include "ui/android/window_android_compositor.h" |
30 | 31 |
31 struct ANativeWindow; | 32 struct ANativeWindow; |
32 | 33 |
33 namespace cc { | 34 namespace cc { |
34 class AnimationHost; | 35 class AnimationHost; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void SetNeedsAnimate() override; | 109 void SetNeedsAnimate() override; |
109 cc::FrameSinkId GetFrameSinkId() override; | 110 cc::FrameSinkId GetFrameSinkId() override; |
110 void AddChildFrameSink(const cc::FrameSinkId& frame_sink_id) override; | 111 void AddChildFrameSink(const cc::FrameSinkId& frame_sink_id) override; |
111 void RemoveChildFrameSink(const cc::FrameSinkId& frame_sink_id) override; | 112 void RemoveChildFrameSink(const cc::FrameSinkId& frame_sink_id) override; |
112 | 113 |
113 void SetVisible(bool visible); | 114 void SetVisible(bool visible); |
114 void CreateLayerTreeHost(); | 115 void CreateLayerTreeHost(); |
115 | 116 |
116 void HandlePendingCompositorFrameSinkRequest(); | 117 void HandlePendingCompositorFrameSinkRequest(); |
117 | 118 |
118 #if defined(ENABLE_VULKAN) | 119 #if BUILDFLAG(ENABLE_VULKAN) |
119 void CreateVulkanOutputSurface(); | 120 void CreateVulkanOutputSurface(); |
120 #endif | 121 #endif |
121 void OnGpuChannelEstablished( | 122 void OnGpuChannelEstablished( |
122 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); | 123 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); |
123 void OnGpuChannelTimeout(); | 124 void OnGpuChannelTimeout(); |
124 void InitializeDisplay( | 125 void InitializeDisplay( |
125 std::unique_ptr<cc::OutputSurface> display_output_surface, | 126 std::unique_ptr<cc::OutputSurface> display_output_surface, |
126 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, | 127 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider, |
127 scoped_refptr<cc::ContextProvider> context_provider); | 128 scoped_refptr<cc::ContextProvider> context_provider); |
128 void DidSwapBuffers(); | 129 void DidSwapBuffers(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> | 179 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> |
179 pending_child_frame_sink_ids_; | 180 pending_child_frame_sink_ids_; |
180 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 181 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
181 | 182 |
182 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 183 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
183 }; | 184 }; |
184 | 185 |
185 } // namespace content | 186 } // namespace content |
186 | 187 |
187 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 188 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |