summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2021-04-21 23:14:13 -0400
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-05-19 13:41:15 +0000
commit9415106b029e5469ca28d882dc46ecc38786d4c9 (patch)
tree22e96bc87aee444ad0b7712eea702eb7092a02ef /ext
parent4dbfae0105e5ea5f71949e6c30ad8f16fe4279d6 (diff)
downloadgstreamer-plugins-bad-9415106b029e5469ca28d882dc46ecc38786d4c9.tar.gz
wpe: Properly respect LIBGL_ALWAYS_SOFTWARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252>
Diffstat (limited to 'ext')
-rw-r--r--ext/wpe/WPEThreadedView.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp
index 8f5902d8f..43161ccda 100644
--- a/ext/wpe/WPEThreadedView.cpp
+++ b/ext/wpe/WPEThreadedView.cpp
@@ -393,21 +393,23 @@ WPEView::WPEView(WebKitWebContext* web_context, GstWpeVideoSrc* src, GstGLContex
threading.ready = FALSE;
g_mutex_init(&images_mutex);
- if (context)
- gst.context = GST_GL_CONTEXT(gst_object_ref(context));
- if (display) {
- gst.display = GST_GL_DISPLAY(gst_object_ref(display));
- }
+ if (g_strcmp0(g_getenv("LIBGL_ALWAYS_SOFTWARE"), "true")) {
+ if (context)
+ gst.context = GST_GL_CONTEXT(gst_object_ref(context));
+ if (display) {
+ gst.display = GST_GL_DISPLAY(gst_object_ref(display));
+ }
- wpe.width = width;
- wpe.height = height;
+ wpe.width = width;
+ wpe.height = height;
- if (context && display) {
- if (gst_gl_context_get_gl_platform(context) == GST_GL_PLATFORM_EGL) {
- gst.display_egl = gst_gl_display_egl_from_gl_display (gst.display);
- } else {
- GST_DEBUG ("Available GStreamer GL Context is not EGL - not creating an EGL display from it");
- }
+ if (context && display) {
+ if (gst_gl_context_get_gl_platform(context) == GST_GL_PLATFORM_EGL) {
+ gst.display_egl = gst_gl_display_egl_from_gl_display (gst.display);
+ } else {
+ GST_DEBUG ("Available GStreamer GL Context is not EGL - not creating an EGL display from it");
+ }
+ }
}
if (gst.display_egl) {