| Index: ui/gl/gl_context_virtual.h
|
| diff --git a/ui/gl/gl_context_glx.h b/ui/gl/gl_context_virtual.h
|
| similarity index 60%
|
| copy from ui/gl/gl_context_glx.h
|
| copy to ui/gl/gl_context_virtual.h
|
| index 2847881b05e1d38dffcdb8e4a28253393ddc406c..9c2cedd716bf08b8ce55ac8064582b019991dc59 100644
|
| --- a/ui/gl/gl_context_glx.h
|
| +++ b/ui/gl/gl_context_virtual.h
|
| @@ -2,24 +2,34 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_GL_GL_CONTEXT_GLX_H_
|
| -#define UI_GL_GL_CONTEXT_GLX_H_
|
| +#ifndef UI_GL_GL_CONTEXT_VIRTUAL_H_
|
| +#define UI_GL_GL_CONTEXT_VIRTUAL_H_
|
|
|
| #include <string>
|
|
|
| #include "base/compiler_specific.h"
|
| -#include "ui/base/x/x11_util.h"
|
| #include "ui/gl/gl_context.h"
|
| #include "ui/gl/gl_export.h"
|
|
|
| +namespace gpu {
|
| +namespace gles2 {
|
| +class GLES2Decoder;
|
| +}
|
| +}
|
| +
|
| namespace gfx {
|
|
|
| +class Display;
|
| class GLSurface;
|
| +class VirtualGL;
|
|
|
| -// Encapsulates a GLX OpenGL context.
|
| -class GL_EXPORT GLContextGLX : public GLContext {
|
| +// Encapsulates a virtual OpenGL context.
|
| +class GL_EXPORT GLContextVirtual : public GLContext {
|
| public:
|
| - explicit GLContextGLX(GLShareGroup* share_group);
|
| + explicit GLContextVirtual(
|
| + GLShareGroup* share_group,
|
| + GLContext* shared_context,
|
| + const gpu::gles2::GLES2Decoder* decoder);
|
|
|
| Display* display();
|
|
|
| @@ -31,21 +41,23 @@ class GL_EXPORT GLContextGLX : public GLContext {
|
| virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
|
| virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
|
| virtual void* GetHandle() OVERRIDE;
|
| + virtual const gpu::gles2::GLES2Decoder* GetDecoder() OVERRIDE;
|
| virtual void SetSwapInterval(int interval) OVERRIDE;
|
| virtual std::string GetExtensions() OVERRIDE;
|
| virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
|
| virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE;
|
|
|
| protected:
|
| - virtual ~GLContextGLX();
|
| + virtual ~GLContextVirtual();
|
|
|
| private:
|
| - void* context_;
|
| + GLContext* shared_context_;
|
| Display* display_;
|
| + const gpu::gles2::GLES2Decoder* decoder_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(GLContextGLX);
|
| + DISALLOW_COPY_AND_ASSIGN(GLContextVirtual);
|
| };
|
|
|
| } // namespace gfx
|
|
|
| -#endif // UI_GL_GL_CONTEXT_GLX_H_
|
| +#endif // UI_GL_GL_CONTEXT_VIRTUAL_H_
|
|
|