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 CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool support_locking; | 92 bool support_locking; |
93 bool automatic_flushes; | 93 bool automatic_flushes; |
94 cc::ContextProvider* shared_context_provider; | 94 cc::ContextProvider* shared_context_provider; |
95 ContextProviderCallback result_callback; | 95 ContextProviderCallback result_callback; |
96 }; | 96 }; |
97 | 97 |
98 ContextProviderFactoryImpl(); | 98 ContextProviderFactoryImpl(); |
99 | 99 |
100 // Will return nullptr if the Gpu channel has not been established. | 100 // Will return nullptr if the Gpu channel has not been established. |
101 gpu::GpuChannelHost* EnsureGpuChannelEstablished(); | 101 gpu::GpuChannelHost* EnsureGpuChannelEstablished(); |
102 void OnGpuChannelEstablished(); | 102 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel); |
103 void OnGpuChannelTimeout(); | 103 void OnGpuChannelTimeout(); |
104 | 104 |
105 void HandlePendingRequests(); | 105 void HandlePendingRequests(); |
106 | 106 |
107 std::list<ContextProvidersRequest> context_provider_requests_; | 107 std::list<ContextProvidersRequest> context_provider_requests_; |
108 | 108 |
109 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; | 109 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; |
110 | 110 |
111 scoped_refptr<cc::VulkanContextProvider> shared_vulkan_context_provider_; | 111 scoped_refptr<cc::VulkanContextProvider> shared_vulkan_context_provider_; |
112 | 112 |
113 bool in_handle_pending_requests_; | 113 bool in_handle_pending_requests_; |
114 | 114 |
115 base::OneShotTimer establish_gpu_channel_timeout_; | 115 base::OneShotTimer establish_gpu_channel_timeout_; |
116 | 116 |
117 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 117 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
118 int surface_client_id_; | 118 int surface_client_id_; |
119 | 119 |
120 base::WeakPtrFactory<ContextProviderFactoryImpl> weak_factory_; | 120 base::WeakPtrFactory<ContextProviderFactoryImpl> weak_factory_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(ContextProviderFactoryImpl); | 122 DISALLOW_COPY_AND_ASSIGN(ContextProviderFactoryImpl); |
123 }; | 123 }; |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
126 | 126 |
127 #endif // CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H
_ | 127 #endif // CONTENT_BROWSER_RENDERER_HOST_CONTEXT_PROVIDER_FACTORY_IMPL_ANDROID_H
_ |
OLD | NEW |