Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1339)

Unified Diff: content/browser/renderer_host/context_provider_factory_impl_android.h

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: change to a Gpu Channel callback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/context_provider_factory_impl_android.h
diff --git a/content/browser/renderer_host/context_provider_factory_impl_android.h b/content/browser/renderer_host/context_provider_factory_impl_android.h
index c0fe933a6ba41c9c7cef080fb0282a69c426a167..e7dbf277e7e2ae9b14a7727cda9a98f6ad48eb3f 100644
--- a/content/browser/renderer_host/context_provider_factory_impl_android.h
+++ b/content/browser/renderer_host/context_provider_factory_impl_android.h
@@ -42,28 +42,26 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
~ContextProviderFactoryImpl() override;
- // The callback may be triggered synchronously, if the Gpu Channel is already
- // initialized. In case the context creation fails, a null context is passed
- // with the failure reason.
- void CreateDisplayContextProvider(
+ scoped_refptr<cc::ContextProvider> CreateDisplayContextProvider(
gpu::SurfaceHandle surface_handle,
gpu::SharedMemoryLimits shared_memory_limits,
gpu::gles2::ContextCreationAttribHelper attributes,
bool support_locking,
bool automatic_flushes,
- ContextProviderCallback result_callback);
+ gpu::GpuChannelHost* gpu_channel_host);
// ContextProviderFactory implementation.
scoped_refptr<cc::VulkanContextProvider> GetSharedVulkanContextProvider()
override;
- void CreateOffscreenContextProvider(
+ void RequestGpuChannelHost(GpuChannelHostCallback callback) override;
+ scoped_refptr<cc::ContextProvider> CreateOffscreenContextProvider(
ContextType context_type,
gpu::SharedMemoryLimits shared_memory_limits,
gpu::gles2::ContextCreationAttribHelper attributes,
bool support_locking,
bool automatic_flushes,
cc::ContextProvider* shared_context_provider,
- ContextProviderCallback result_callback) override;
+ gpu::GpuChannelHost* gpu_channel_host) override;
cc::SurfaceManager* GetSurfaceManager() override;
uint32_t AllocateSurfaceClientId() override;
cc::SharedBitmapManager* GetSharedBitmapManager() override;
@@ -73,7 +71,7 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
ContextProviderFactoryImpl(
gpu::GpuChannelEstablishFactory* gpu_channel_factory);
- void CreateContextProviderInternal(
+ scoped_refptr<cc::ContextProvider> CreateContextProviderInternal(
command_buffer_metrics::ContextType context_type,
gpu::SurfaceHandle surface_handle,
gpu::SharedMemoryLimits shared_memory_limits,
@@ -81,22 +79,7 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
bool support_locking,
bool automatic_flushes,
cc::ContextProvider* shared_context_provider,
- ContextProviderCallback result_callback);
-
- struct ContextProvidersRequest {
- ContextProvidersRequest();
- ContextProvidersRequest(const ContextProvidersRequest& other);
- ~ContextProvidersRequest();
-
- command_buffer_metrics::ContextType context_type;
- gpu::SurfaceHandle surface_handle;
- gpu::SharedMemoryLimits shared_memory_limits;
- gpu::gles2::ContextCreationAttribHelper attributes;
- bool support_locking;
- bool automatic_flushes;
- cc::ContextProvider* shared_context_provider;
- ContextProviderCallback result_callback;
- };
+ gpu::GpuChannelHost* gpu_channel_host);
// Will return nullptr if the Gpu channel has not been established.
void EstablishGpuChannel();
@@ -105,11 +88,11 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
void HandlePendingRequests(
scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
- ContextCreationResult result);
+ GpuChannelHostResult result);
gpu::GpuChannelEstablishFactory* gpu_channel_factory_;
- std::list<ContextProvidersRequest> context_provider_requests_;
+ std::list<GpuChannelHostCallback> gpu_channel_requests_;
scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;

Powered by Google App Engine
This is Rietveld 408576698