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

Unified Diff: ui/gl/gl_share_group.h

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)
Patch Set: auto* 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 | « ui/gl/gl_context.cc ('k') | ui/gl/gl_share_group.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_share_group.h
diff --git a/ui/gl/gl_share_group.h b/ui/gl/gl_share_group.h
index e991d2009dffdb0b6a47400359b08324de91230c..99ce887d9e26ba57bbd673e80a4a0e72984084d5 100644
--- a/ui/gl/gl_share_group.h
+++ b/ui/gl/gl_share_group.h
@@ -6,6 +6,7 @@
#define UI_GL_GL_SHARE_GROUP_H_
#include <set>
+#include <unordered_map>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -15,6 +16,7 @@
namespace gl {
class GLContext;
+class GLSurface;
// A group of GL contexts that share an ID namespace.
class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
@@ -34,10 +36,9 @@ class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
// or NULL if there are no initialized contexts in the share group.
GLContext* GetContext();
- // Sets and returns the unique shared GL context. Used for context
- // virtualization.
- void SetSharedContext(GLContext* context);
- GLContext* GetSharedContext();
+ // Sets and returns the shared GL context. Used for context virtualization.
+ void SetSharedContext(GLSurface* compatible, GLContext* context);
+ GLContext* GetSharedContext(GLSurface* compatible);
#if defined(OS_MACOSX)
// Sets and returns the ID of the renderer that all contexts in this share
@@ -56,7 +57,7 @@ class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
typedef std::set<GLContext*> ContextSet;
ContextSet contexts_;
- GLContext* shared_context_;
+ std::unordered_map<unsigned long, GLContext*> shared_contexts_;
#if defined(OS_MACOSX)
int renderer_id_;
« no previous file with comments | « ui/gl/gl_context.cc ('k') | ui/gl/gl_share_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698