[CAIRO] Make GLContextGLX a subclass of GLContext
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 21:07:47 +0000 (21:07 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 21:07:47 +0000 (21:07 +0000)
commite8ef9f7ae9090709cc07275c31188fe5568e5e4c
tree1646866e27492eb6db1700188da3acedac8bc683
parentbae0d8fdac2435ed8f64d82016667786616acbcc
[CAIRO] Make GLContextGLX a subclass of GLContext
https://bugs.webkit.org/show_bug.cgi?id=81285

Reviewed by Gustavo Noronha Silva.

.:

* GNUmakefile.am: Add a configuration option for activating GLX.
This is selected automatically now, but in the future there will be
the choice to turn on EGL and turn off GLX at compilation time.
* configure.ac: Ditto.

Source/WebCore:

No new tests. This should not change behavior.

* GNUmakefile.list.am: Add new GLContextGLX files.
* platform/graphics/cairo/GLContext.cpp: Added. Composed of the
EGL/GLX independent portions of GLContext. Made the current context
a static variable so we can keep getting the current context platform-
-independent.
* platform/graphics/cairo/GLContext.h: Make this class an abstract
class. GLContextGLX is a concrete implementation.
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp: Updated to reflect
slightly different calling conventions to create a sharing context.
* platform/graphics/glx/GLContextGLX.cpp: Updated to reflect
that this code is in a subclass now.
* platform/graphics/glx/GLContextGLX.h: Copied from Source/WebCore/platform/graphics/cairo/GLContext.h.
* platform/graphics/gtk/GLContextGtk.cpp:
(WebCore::GLContext::getContextForWidget): Updated to respect the new
USE(GLX) flag.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
GNUmakefile.am
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/platform/graphics/cairo/GLContext.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/cairo/GLContext.h
Source/WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp
Source/WebCore/platform/graphics/glx/GLContextGLX.cpp
Source/WebCore/platform/graphics/glx/GLContextGLX.h [new file with mode: 0644]
Source/WebCore/platform/graphics/gtk/GLContextGtk.cpp
configure.ac