diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-04 18:15:57 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-04 18:15:57 +0000 |
commit | cfcf1486f8ba432b3d67d2b4e0b4d248a1c0e042 (patch) | |
tree | 166a9f02642362b819bfcb85efeafd2ba546b6fc /ui/gfx/gl/gl_surface_wgl.h | |
parent | c75f33e44402f2c74e0f69f064e778cc8b5df3c9 (diff) | |
download | chromium_src-cfcf1486f8ba432b3d67d2b4e0b4d248a1c0e042.zip chromium_src-cfcf1486f8ba432b3d67d2b4e0b4d248a1c0e042.tar.gz chromium_src-cfcf1486f8ba432b3d67d2b4e0b4d248a1c0e042.tar.bz2 |
Split GLX implementations of *GLContext into GLContextGLX and *GLSurfaceGLX.
Surfaces are independent of contexts in GL. To facilitate sharing of surfaces between processes, I have separated them from the notion of contexts because contexts cannot be shared between processes.
I started with EGL in r81512 and WGL in r81807 and OSMesa in r81998. This is the same thing for GLX
GLContextGLX still has a pointer to a surface and still has some surface specific operations that just forward through to it. Once I have refactored all the GLContext implementations in this way, I will remove these pointers and the surface specific opertations.
There will not be "view" and "offscreen" GL contexts. Rather there will be a single context type for each backend which can be made current with a surface that directs output either to a view or offscreen surface.
Also, added virtual qualifier to GLSurface::Initialize implementations to silence clang warnings.
TEST=WebGL locally, try
BUG=none
Review URL: http://codereview.chromium.org/6864031
Review URL: http://codereview.chromium.org/6881024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_surface_wgl.h')
-rw-r--r-- | ui/gfx/gl/gl_surface_wgl.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/gfx/gl/gl_surface_wgl.h b/ui/gfx/gl/gl_surface_wgl.h index d94c565..b768655 100644 --- a/ui/gfx/gl/gl_surface_wgl.h +++ b/ui/gfx/gl/gl_surface_wgl.h @@ -27,10 +27,8 @@ class NativeViewGLSurfaceWGL : public GLSurfaceWGL { explicit NativeViewGLSurfaceWGL(gfx::PluginWindowHandle window); virtual ~NativeViewGLSurfaceWGL(); - // Initializes the GL context. - bool Initialize(); - // Implement GLSurface. + virtual bool Initialize(); virtual void Destroy(); virtual bool IsOffscreen(); virtual bool SwapBuffers(); @@ -51,10 +49,8 @@ class PbufferGLSurfaceWGL : public GLSurfaceWGL { explicit PbufferGLSurfaceWGL(const gfx::Size& size); virtual ~PbufferGLSurfaceWGL(); - // Initializes the GL context. - bool Initialize(); - // Implement GLSurface. + virtual bool Initialize(); virtual void Destroy(); virtual bool IsOffscreen(); virtual bool SwapBuffers(); |