Skip to content
Permalink
Browse files
[GStreamer] Create a Wayland GL display instead of EGL
https://bugs.webkit.org/show_bug.cgi?id=182968

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Add logging and instantiate a GstDisplayWayland display instead of
an EGL display when running under a Wayland compositor.

Canonical link: https://commits.webkit.org/198744@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn committed Feb 21, 2018
1 parent d2a0a5f commit 3c8c8ee8732e6149ea12086ffe155040de45062e
Showing 2 changed files with 25 additions and 4 deletions.
@@ -1,3 +1,15 @@
2018-02-21 Philippe Normand <pnormand@igalia.com>

[GStreamer] Create a Wayland GL display instead of EGL
https://bugs.webkit.org/show_bug.cgi?id=182968

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Add logging and instantiate a GstDisplayWayland display instead of
an EGL display when running under a Wayland compositor.

2018-02-21 Zalan Bujtas <zalan@apple.com>

[RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTreeBuilder
@@ -93,6 +93,7 @@

#if PLATFORM(WAYLAND)
#include "PlatformDisplayWayland.h"
#include <gst/gl/wayland/gstgldisplay_wayland.h>
#elif PLATFORM(WPE)
#include "PlatformDisplayWPE.h"
#endif
@@ -436,24 +437,32 @@ bool MediaPlayerPrivateGStreamerBase::ensureGstGLContext()
return true;

auto& sharedDisplay = PlatformDisplay::sharedDisplayForCompositing();

if (!m_glDisplay) {
#if PLATFORM(X11)
#if USE(GLX)
if (is<PlatformDisplayX11>(sharedDisplay))
if (is<PlatformDisplayX11>(sharedDisplay)) {
GST_DEBUG("Creating X11 shared GL display");
m_glDisplay = GST_GL_DISPLAY(gst_gl_display_x11_new_with_display(downcast<PlatformDisplayX11>(sharedDisplay).native()));
}
#elif USE(EGL)
if (is<PlatformDisplayX11>(sharedDisplay))
if (is<PlatformDisplayX11>(sharedDisplay)) {
GST_DEBUG("Creating X11 shared EGL display");
m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayX11>(sharedDisplay).eglDisplay()));
}
#endif
#endif

#if PLATFORM(WAYLAND)
if (is<PlatformDisplayWayland>(sharedDisplay))
m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayWayland>(sharedDisplay).eglDisplay()));
if (is<PlatformDisplayWayland>(sharedDisplay)) {
GST_DEBUG("Creating Wayland shared display");
m_glDisplay = GST_GL_DISPLAY(gst_gl_display_wayland_new_with_display(downcast<PlatformDisplayWayland>(sharedDisplay).native()));
}
#endif

#if PLATFORM(WPE)
ASSERT(is<PlatformDisplayWPE>(sharedDisplay));
GST_DEBUG("Creating WPE shared EGL display");
m_glDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(downcast<PlatformDisplayWPE>(sharedDisplay).eglDisplay()));
#endif

0 comments on commit 3c8c8ee

Please sign in to comment.