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_ |