[GStreamer] More GL shared context fixes
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Mar 2015 15:22:04 +0000 (15:22 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Mar 2015 15:22:04 +0000 (15:22 +0000)
commitd40cb4bf33acaf24fe2c26ceb05d1ad95b59d2a8
tree7d25001452ab6567123ecb4b497e55cb34b7b1cb
parenteebfa1f2e2e6243d84618a82610305ff32729584
[GStreamer] More GL shared context fixes
https://bugs.webkit.org/show_bug.cgi?id=143216

Reviewed by Carlos Garcia Campos.

Moved the GLX/EGL context tests to be done at runtime rather than
using build-time macros because in the GTK port at least, both EGL
and GLX support are mutually exclusive. Also fixed a couple wrong
defines (USE(GLES2) doesn't exist).

* platform/graphics/GLContext.h: Simple utility method to check if
the platform context is compatible with EGL APIs or not.
* platform/graphics/egl/GLContextEGL.h:
(WebCore::GLContextEGL::isEGLContext):
* platform/graphics/glx/GLContextGLX.h:
(WebCore::GLContextGLX::isEGLContext):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
runtime checks and properly ensure GLES2/GL API usage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GLContext.h
Source/WebCore/platform/graphics/egl/GLContextEGL.h
Source/WebCore/platform/graphics/glx/GLContextGLX.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp