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