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

Unified Diff: ui/gl/gl_share_group.h

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)
Patch Set: Fix various tests 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
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..004dac979905e525a368e99a82529d46b4f631f9 100644
--- a/ui/gl/gl_share_group.h
+++ b/ui/gl/gl_share_group.h
@@ -15,6 +15,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 +35,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.
+ virtual void SetSharedContext(GLSurface* compatible, GLContext* context);
+ virtual GLContext* GetSharedContext(GLSurface* compatible);
#if defined(OS_MACOSX)
// Sets and returns the ID of the renderer that all contexts in this share
@@ -46,11 +46,12 @@ class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
int GetRendererID();
#endif
+ protected:
+ virtual ~GLShareGroup();
+
private:
friend class base::RefCounted<GLShareGroup>;
- ~GLShareGroup();
-
// References to GLContext are by raw pointer to avoid a reference count
// cycle.
typedef std::set<GLContext*> ContextSet;
@@ -65,6 +66,8 @@ class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
DISALLOW_COPY_AND_ASSIGN(GLShareGroup);
};
+GL_EXPORT GLShareGroup* CreateGLShareGroup();
+
} // namespace gl
#endif // UI_GL_GL_SHARE_GROUP_H_

Powered by Google App Engine
This is Rietveld 408576698