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

Unified Diff: ui/gl/gl_share_group_glx.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_glx.h
diff --git a/ui/gl/gl_share_group_glx.h b/ui/gl/gl_share_group_glx.h
new file mode 100644
index 0000000000000000000000000000000000000000..9d6d25198280eaef7dbcf384ce8995b52b266735
--- /dev/null
+++ b/ui/gl/gl_share_group_glx.h
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GL_GL_SHARE_GROUP_GLX_H_
+#define UI_GL_GL_SHARE_GROUP_GLX_H_
+
+#include <map>
+
+#include "base/memory/weak_ptr.h"
+#include "ui/gl/gl_share_group.h"
+
+namespace gl {
+
+// A group of GL contexts that share an ID namespace.
+class GL_EXPORT GLShareGroupGLX : public GLShareGroup {
piman 2016/09/22 21:24:55 Maybe we can avoid special-casing GLX here, by mov
+ public:
+ GLShareGroupGLX();
+
+ void SetSharedContext(GLSurface* compatible, GLContext* context) override;
+ GLContext* GetSharedContext(GLSurface* compatible) override;
+
+ private:
+ ~GLShareGroupGLX() override;
+
+ std::map<unsigned long, base::WeakPtr<GLContext>> shared_contexts_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLShareGroupGLX);
+};
+
+} // namespace gl
+
+#endif // UI_GL_GL_SHARE_GROUP_GLX_H_

Powered by Google App Engine
This is Rietveld 408576698