| Index: ui/gl/gl_share_group.cc
|
| diff --git a/ui/gl/gl_share_group.cc b/ui/gl/gl_share_group.cc
|
| index 82fc7594f4dd4ff0090593312e133e3b2837b1ef..52f1f24a68ad53f785e03f61433f9a519de4bbdd 100644
|
| --- a/ui/gl/gl_share_group.cc
|
| +++ b/ui/gl/gl_share_group.cc
|
| @@ -7,6 +7,11 @@
|
| #include "base/logging.h"
|
| #include "build/build_config.h"
|
| #include "ui/gl/gl_context.h"
|
| +#include "ui/gl/gl_implementation.h"
|
| +
|
| +#if defined(USE_X11)
|
| +#include "gl_share_group_glx.h"
|
| +#endif
|
|
|
| namespace gl {
|
|
|
| @@ -47,12 +52,12 @@ GLContext* GLShareGroup::GetContext() {
|
| return NULL;
|
| }
|
|
|
| -void GLShareGroup::SetSharedContext(GLContext* context) {
|
| +void GLShareGroup::SetSharedContext(GLSurface* compatible, GLContext* context) {
|
| DCHECK(contexts_.find(context) != contexts_.end());
|
| shared_context_ = context;
|
| }
|
|
|
| -GLContext* GLShareGroup::GetSharedContext() {
|
| +GLContext* GLShareGroup::GetSharedContext(GLSurface* compatible) {
|
| return shared_context_;
|
| }
|
|
|
| @@ -69,4 +74,12 @@ int GLShareGroup::GetRendererID() {
|
| GLShareGroup::~GLShareGroup() {
|
| }
|
|
|
| +GLShareGroup* CreateGLShareGroup() {
|
| +#if defined(USE_X11)
|
| + if (GetGLImplementation() == kGLImplementationDesktopGL)
|
| + return new GLShareGroupGLX();
|
| +#endif
|
| + return new GLShareGroup();
|
| +}
|
| +
|
| } // namespace gl
|
|
|