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

Unified Diff: webkit/common/gpu/context_provider_in_process.h

Issue 23072008: aura: Allow in process ContextProvider to hold onscreen contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inprocesscreatecallback: nit Created 7 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
« no previous file with comments | « ui/compositor/compositor.cc ('k') | webkit/common/gpu/context_provider_in_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/gpu/context_provider_in_process.h
diff --git a/webkit/common/gpu/context_provider_in_process.h b/webkit/common/gpu/context_provider_in_process.h
index b427abeb043f6144adb281575c3af63e3218b2c7..169a1a8fdd3e6eab49eba6257e7c02199bd4904b 100644
--- a/webkit/common/gpu/context_provider_in_process.h
+++ b/webkit/common/gpu/context_provider_in_process.h
@@ -19,17 +19,21 @@ class WebGraphicsContext3D;
namespace webkit {
namespace gpu {
class GrContextForWebGraphicsContext3D;
+class WebGraphicsContext3DInProcessCommandBufferImpl;
class WEBKIT_GPU_EXPORT ContextProviderInProcess
: NON_EXPORTED_BASE(public cc::ContextProvider) {
public:
- static scoped_refptr<ContextProviderInProcess> Create() {
- scoped_refptr<ContextProviderInProcess> provider =
- new ContextProviderInProcess;
- if (!provider->InitializeOnMainThread())
- return NULL;
- return provider;
- }
+ typedef base::Callback<
+ scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>(void)>
+ CreateCallback;
+
+ static scoped_refptr<ContextProviderInProcess> Create(
+ const CreateCallback& create_callback);
+
+ // Calls Create() with a default factory method for creating an offscreen
+ // context.
+ static scoped_refptr<ContextProviderInProcess> CreateOffscreen();
virtual bool BindToCurrentThread() OVERRIDE;
virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
@@ -43,7 +47,8 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess
ContextProviderInProcess();
virtual ~ContextProviderInProcess();
- bool InitializeOnMainThread();
+ bool InitializeOnMainThread(
+ const CreateCallback& create_callback);
void OnLostContext();
void OnMemoryAllocationChanged(bool nonzero_allocation);
« no previous file with comments | « ui/compositor/compositor.cc ('k') | webkit/common/gpu/context_provider_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698