| Index: cc/output/context_provider.h
|
| diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
|
| index 2245b643e134b464d0db441cd4bd5dfae0ca2d2e..0ebb02eb13e0668fc59600525fce167512fcef12 100644
|
| --- a/cc/output/context_provider.h
|
| +++ b/cc/output/context_provider.h
|
| @@ -57,13 +57,15 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
|
| base::AutoLock context_lock_;
|
| };
|
|
|
| - // Bind the 3d context to the current thread. This should be called before
|
| - // accessing the contexts. Calling it more than once should have no effect.
|
| - // Once this function has been called, the class should only be accessed
|
| - // from the same thread unless the function has some explicitly specified
|
| - // rules for access on a different thread. See SetupLockOnMainThread(), which
|
| - // can be used to provide access from multiple threads.
|
| - virtual bool BindToCurrentThread() = 0;
|
| + // This Factory class allows deferred creation of a context provider (for eg.
|
| + // on another thread than the main thread).
|
| + class Factory {
|
| + public:
|
| + // Creates and returns a new context provider. The context provider may only
|
| + // be used on the thread it is created on unless it supports locking (via
|
| + // the ScopedContextLock class).
|
| + virtual scoped_refptr<ContextProvider> CreateContext() = 0;
|
| + };
|
|
|
| virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
|
| virtual gpu::ContextSupport* ContextSupport() = 0;
|
|
|