| Index: cc/output/context_provider.h
|
| diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
|
| index 7362e8b55aa9acffd62060af1ed08c766581c4f2..71d06bd7591d22f180f7a395b5be412d733b03bb 100644
|
| --- a/cc/output/context_provider.h
|
| +++ b/cc/output/context_provider.h
|
| @@ -12,6 +12,10 @@
|
|
|
| class GrContext;
|
|
|
| +namespace base {
|
| +class Lock;
|
| +}
|
| +
|
| namespace gpu {
|
| class ContextSupport;
|
| namespace gles2 { class GLES2Interface; }
|
| @@ -27,6 +31,7 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
|
| // Once this function has been called, the class should only be accessed
|
| // from the same thread.
|
| virtual bool BindToCurrentThread() = 0;
|
| + virtual void DetachFromThread() {}
|
|
|
| virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
|
| virtual gpu::ContextSupport* ContextSupport() = 0;
|
| @@ -39,6 +44,13 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
|
| CC_EXPORT Capabilities();
|
| };
|
|
|
| + // Sets up a lock so this context can be used from multiple threads.
|
| + virtual void SetupLock() = 0;
|
| +
|
| + // Returns the lock that should be held if using this context from multiple
|
| + // threads.
|
| + virtual base::Lock* GetLock() = 0;
|
| +
|
| // Returns the capabilities of the currently bound 3d context.
|
| virtual Capabilities ContextCapabilities() = 0;
|
|
|
|
|