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

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

Issue 2250473005: content: Fix Context creation logic in ContextProviderFactoryImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 4 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 3a820fbcb3a2fc0fb6b1abc9796b9d8ee3316dcd..89c169539fb2022047b6aea0e22ee23a5e41ad52 100644
--- a/content/browser/renderer_host/context_provider_factory_impl_android.h
+++ b/content/browser/renderer_host/context_provider_factory_impl_android.h
@@ -41,8 +41,8 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
~ContextProviderFactoryImpl() override;
// The callback may be triggered synchronously, if the Gpu Channel is already
- // initialized. In case the surface_handle is invalidated before the context
- // can be created, the request is dropped and the callback will *not* run.
+ // initialized. In case the context creation fails, a null context is passed
+ // with the failure reason.
void CreateDisplayContextProvider(
gpu::SurfaceHandle surface_handle,
gpu::SharedMemoryLimits shared_memory_limits,
@@ -98,11 +98,14 @@ class CONTENT_EXPORT ContextProviderFactoryImpl
ContextProviderFactoryImpl();
// Will return nullptr if the Gpu channel has not been established.
- gpu::GpuChannelHost* EnsureGpuChannelEstablished();
+ void EstablishGpuChannel();
void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel);
void OnGpuChannelTimeout();
- void HandlePendingRequests();
+ void CheckCanHandlePendingRequests();
+ void HandlePendingRequests(
+ scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
+ ContextCreationResult result);
std::list<ContextProvidersRequest> context_provider_requests_;

Powered by Google App Engine
This is Rietveld 408576698