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

Unified Diff: cc/output/context_provider.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « cc/output/compositor_frame_metadata.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/output/compositor_frame_metadata.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698