Title: [280135] releases/WebKitGTK/webkit-2.32/Source/WebCore
Revision
280135
Author
[email protected]
Date
2021-07-21 07:44:55 -0700 (Wed, 21 Jul 2021)

Log Message

Merge r279873 - [GStreamer] Allow runtime opt-out of GL rendering
https://bugs.webkit.org/show_bug.cgi?id=227873

Patch by Philippe Normand <[email protected]> on 2021-07-13
Reviewed by Xabier Rodriguez-Calvar.

In some cases GL rendering is not really useful, such as on machines without GPU. In those
cases currently Mesa's llvmpipe is used, introducing CPU and RAM usage increase compared to
the non-gl rendering path. For these cases the user can set a new env var,
WEBKIT_GST_DISABLE_GL_SINK=1, allowing the player to use the Cairo sink.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createVideoSinkGL):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (280134 => 280135)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-07-21 14:44:49 UTC (rev 280134)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-07-21 14:44:55 UTC (rev 280135)
@@ -1,3 +1,18 @@
+2021-07-13  Philippe Normand  <[email protected]>
+
+        [GStreamer] Allow runtime opt-out of GL rendering
+        https://bugs.webkit.org/show_bug.cgi?id=227873
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        In some cases GL rendering is not really useful, such as on machines without GPU. In those
+        cases currently Mesa's llvmpipe is used, introducing CPU and RAM usage increase compared to
+        the non-gl rendering path. For these cases the user can set a new env var,
+        WEBKIT_GST_DISABLE_GL_SINK=1, allowing the player to use the Cairo sink.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::createVideoSinkGL):
+
 2021-03-05  Myles C. Maxfield  <[email protected]>
 
         CanvasRenderingContext2DBase::canDrawTextWithParams() needs to resolve styles before using the drawingContext

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (280134 => 280135)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2021-07-21 14:44:49 UTC (rev 280134)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2021-07-21 14:44:55 UTC (rev 280135)
@@ -3360,6 +3360,12 @@
 #if USE(GSTREAMER_GL)
 GstElement* MediaPlayerPrivateGStreamer::createVideoSinkGL()
 {
+    const char* disableGLSink = g_getenv("WEBKIT_GST_DISABLE_GL_SINK");
+    if (disableGLSink && equal(disableGLSink, "1")) {
+        GST_INFO("Disabling hardware-accelerated rendering per user request.");
+        return nullptr;
+    }
+
     if (!webKitGLVideoSinkProbePlatform()) {
         g_warning("WebKit wasn't able to find the GL video sink dependencies. Hardware-accelerated zero-copy video rendering can't be enabled without this plugin.");
         return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to