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 #include "content/browser/renderer_host/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 SingleThreadTaskGraphRunner task_graph_runner; | 98 SingleThreadTaskGraphRunner task_graph_runner; |
99 cc::SurfaceManager surface_manager; | 99 cc::SurfaceManager surface_manager; |
100 cc::FrameSinkIdAllocator frame_sink_id_allocator; | 100 cc::FrameSinkIdAllocator frame_sink_id_allocator; |
101 | 101 |
102 #if defined(ENABLE_VULKAN) | 102 #if defined(ENABLE_VULKAN) |
103 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider; | 103 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider; |
104 #endif | 104 #endif |
105 }; | 105 }; |
106 | 106 |
107 base::LazyInstance<CompositorDependencies> g_compositor_dependencies = | 107 base::LazyInstance<CompositorDependencies>::DestructorAtExit |
108 LAZY_INSTANCE_INITIALIZER; | 108 g_compositor_dependencies = LAZY_INSTANCE_INITIALIZER; |
109 | 109 |
110 const unsigned int kMaxDisplaySwapBuffers = 1U; | 110 const unsigned int kMaxDisplaySwapBuffers = 1U; |
111 | 111 |
112 #if defined(ENABLE_VULKAN) | 112 #if defined(ENABLE_VULKAN) |
113 scoped_refptr<cc::VulkanContextProvider> GetSharedVulkanContextProvider() { | 113 scoped_refptr<cc::VulkanContextProvider> GetSharedVulkanContextProvider() { |
114 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 114 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
115 switches::kEnableVulkan)) { | 115 switches::kEnableVulkan)) { |
116 scoped_refptr<cc::VulkanContextProvider> context_provider = | 116 scoped_refptr<cc::VulkanContextProvider> context_provider = |
117 g_compositor_dependencies.Get().vulkan_context_provider; | 117 g_compositor_dependencies.Get().vulkan_context_provider; |
118 if (!*context_provider) | 118 if (!*context_provider) |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 } | 821 } |
822 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 822 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
823 frame_sink_id); | 823 frame_sink_id); |
824 } | 824 } |
825 | 825 |
826 bool CompositorImpl::HavePendingReadbacks() { | 826 bool CompositorImpl::HavePendingReadbacks() { |
827 return !readback_layer_tree_->children().empty(); | 827 return !readback_layer_tree_->children().empty(); |
828 } | 828 } |
829 | 829 |
830 } // namespace content | 830 } // namespace content |
OLD | NEW |