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

Unified Diff: ui/android/context_provider_factory.h

Issue 2299333003: Revert of Revert "Revert of content: Fix Context creation logic in ContextProviderFactoryImpl." (Closed)
Patch Set: 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
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/context_provider_factory.h
diff --git a/ui/android/context_provider_factory.h b/ui/android/context_provider_factory.h
index 0933afe2eda292b7771e6aceb8e1ca621cecd0c1..8ad9d6f4a0c3eacef8a1e0982a974b337ceb4684 100644
--- a/ui/android/context_provider_factory.h
+++ b/ui/android/context_provider_factory.h
@@ -31,24 +31,8 @@
// This class is not thread-safe and should only be accessed from the UI thread.
class UI_ANDROID_EXPORT ContextProviderFactory {
public:
- enum class ContextCreationResult {
- FAILURE_GPU_PROCESS_INITIALIZATION_FAILED,
-
- // Used when the factory is shutting down. No more requests should be made
- // to the factory after this response is dispatched.
- FAILURE_FACTORY_SHUTDOWN,
-
- // The GpuSurfaceHandle for the request was lost before the context could be
- // created. This is used for on-screen context requests only.
- FAILURE_GPU_SURFACE_HANDLE_LOST,
-
- // Set if the Context creation was successful.
- SUCCESS,
- };
-
using ContextProviderCallback =
- base::Callback<void(const scoped_refptr<cc::ContextProvider>&,
- ContextCreationResult)>;
+ base::Callback<void(const scoped_refptr<cc::ContextProvider>&)>;
enum class ContextType {
BLIMP_RENDER_COMPOSITOR_CONTEXT,
@@ -68,8 +52,8 @@
// Creates an offscreen ContextProvider for the compositor. Any shared
// contexts passed here *must* have been created using this factory.
- // The callback may be triggered synchronously if possible. If the context
- // creation fails, a null context is passed with the specified reason.
+ // The callback may be triggered synchronously if possible, and will always
+ // have the context provider.
virtual void CreateOffscreenContextProvider(
ContextType context_type,
gpu::SharedMemoryLimits shared_memory_limits,
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698