Title: [292153] trunk/Source/WebKit
Revision
292153
Author
[email protected]
Date
2022-03-31 04:39:22 -0700 (Thu, 31 Mar 2022)

Log Message

[GTK][WPE][GPUProcess] Switch GPUProcessGStreamer.cpp, GPUProcessMainGStreamer.cpp to the GLib flavor
https://bugs.webkit.org/show_bug.cgi?id=238597

Reviewed by Adrian Perez de Castro.

Move the GStreamer implementations for the platform-specific GPUProcess
methods and entrypoint into GLib-flavored files. This fits better the
purpose of the GPUProcess since it's been extended beyond just media
playback. Instead of USE(GSTREAMER), the code in these files is now
guarded by (PLATFORM(GTK) || PLATFORM(WPE)), the two ports depending
on the GLib library.

The GPUProcessMain entrypoint, since it's unconditionally exported in
the library, is now also unconditionally defined, but with the internal
implementation launching the GPUProcess logic if ENABLE(GPU_PROCESS) is
enabled and simply returning 0 otherwise.

* GPUProcess/glib/GPUProcessGLib.cpp: Renamed from Source/WebKit/GPUProcess/gstreamer/GPUProcessGStreamer.cpp.
(WebKit::GPUProcess::initializeProcess):
(WebKit::GPUProcess::initializeProcessName):
(WebKit::GPUProcess::initializeSandbox):
* GPUProcess/glib/GPUProcessMainGLib.cpp: Renamed from Source/WebKit/GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp.
(WebKit::GPUProcessMain):
* SourcesGTK.txt:
* SourcesWPE.txt:
* webkitglib-symbols.map:

Modified Paths

Added Paths

Removed Paths

  • trunk/Source/WebKit/GPUProcess/gstreamer/

Diff

Modified: trunk/Source/WebKit/ChangeLog (292152 => 292153)


--- trunk/Source/WebKit/ChangeLog	2022-03-31 11:17:14 UTC (rev 292152)
+++ trunk/Source/WebKit/ChangeLog	2022-03-31 11:39:22 UTC (rev 292153)
@@ -1,3 +1,32 @@
+2022-03-31  Zan Dobersek  <[email protected]>
+
+        [GTK][WPE][GPUProcess] Switch GPUProcessGStreamer.cpp, GPUProcessMainGStreamer.cpp to the GLib flavor
+        https://bugs.webkit.org/show_bug.cgi?id=238597
+
+        Reviewed by Adrian Perez de Castro.
+
+        Move the GStreamer implementations for the platform-specific GPUProcess
+        methods and entrypoint into GLib-flavored files. This fits better the
+        purpose of the GPUProcess since it's been extended beyond just media
+        playback. Instead of USE(GSTREAMER), the code in these files is now
+        guarded by (PLATFORM(GTK) || PLATFORM(WPE)), the two ports depending
+        on the GLib library.
+
+        The GPUProcessMain entrypoint, since it's unconditionally exported in
+        the library, is now also unconditionally defined, but with the internal
+        implementation launching the GPUProcess logic if ENABLE(GPU_PROCESS) is
+        enabled and simply returning 0 otherwise.
+
+        * GPUProcess/glib/GPUProcessGLib.cpp: Renamed from Source/WebKit/GPUProcess/gstreamer/GPUProcessGStreamer.cpp.
+        (WebKit::GPUProcess::initializeProcess):
+        (WebKit::GPUProcess::initializeProcessName):
+        (WebKit::GPUProcess::initializeSandbox):
+        * GPUProcess/glib/GPUProcessMainGLib.cpp: Renamed from Source/WebKit/GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp.
+        (WebKit::GPUProcessMain):
+        * SourcesGTK.txt:
+        * SourcesWPE.txt:
+        * webkitglib-symbols.map:
+
 2022-03-31  Ben Nham  <[email protected]>
 
         Fix null string crashes in PushService

Copied: trunk/Source/WebKit/GPUProcess/glib/GPUProcessGLib.cpp (from rev 292152, trunk/Source/WebKit/GPUProcess/gstreamer/GPUProcessGStreamer.cpp) (0 => 292153)


--- trunk/Source/WebKit/GPUProcess/glib/GPUProcessGLib.cpp	                        (rev 0)
+++ trunk/Source/WebKit/GPUProcess/glib/GPUProcessGLib.cpp	2022-03-31 11:39:22 UTC (rev 292153)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GPUProcess.h"
+
+#if ENABLE(GPU_PROCESS) && (PLATFORM(GTK) || PLATFORM(WPE))
+
+#include "GPUProcessCreationParameters.h"
+
+namespace WebKit {
+
+void GPUProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&)
+{
+}
+
+void GPUProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&)
+{
+}
+
+void GPUProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS) && (PLATFORM(GTK) || PLATFORM(WPE))

Copied: trunk/Source/WebKit/GPUProcess/glib/GPUProcessMainGLib.cpp (from rev 292152, trunk/Source/WebKit/GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp) (0 => 292153)


--- trunk/Source/WebKit/GPUProcess/glib/GPUProcessMainGLib.cpp	                        (rev 0)
+++ trunk/Source/WebKit/GPUProcess/glib/GPUProcessMainGLib.cpp	2022-03-31 11:39:22 UTC (rev 292153)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2020 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GPUProcessMain.h"
+
+#if ENABLE(GPU_PROCESS) && (PLATFORM(GTK) || PLATFORM(WPE))
+#include "AuxiliaryProcessMain.h"
+#include "GPUProcess.h"
+#endif
+
+namespace WebKit {
+
+#if ENABLE(GPU_PROCESS) && (PLATFORM(GTK) || PLATFORM(WPE))
+class GPUProcessMainGStreamer final: public AuxiliaryProcessMainBaseNoSingleton<GPUProcess> {
+};
+#endif
+
+int GPUProcessMain(int argc, char** argv)
+{
+#if ENABLE(GPU_PROCESS) && (PLATFORM(GTK) || PLATFORM(WPE))
+    return AuxiliaryProcessMain<GPUProcessMainGStreamer>(argc, argv);
+#else
+    return 0;
+#endif
+}
+
+} // namespace WebKit

Modified: trunk/Source/WebKit/SourcesGTK.txt (292152 => 292153)


--- trunk/Source/WebKit/SourcesGTK.txt	2022-03-31 11:17:14 UTC (rev 292152)
+++ trunk/Source/WebKit/SourcesGTK.txt	2022-03-31 11:39:22 UTC (rev 292153)
@@ -21,8 +21,8 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 // THE POSSIBILITY OF SUCH DAMAGE.
 
-GPUProcess/gstreamer/GPUProcessGStreamer.cpp
-GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp
+GPUProcess/glib/GPUProcessGLib.cpp
+GPUProcess/glib/GPUProcessMainGLib.cpp
 
 GPUProcess/media/RemoteAudioDestinationManager.cpp
 

Modified: trunk/Source/WebKit/SourcesWPE.txt (292152 => 292153)


--- trunk/Source/WebKit/SourcesWPE.txt	2022-03-31 11:17:14 UTC (rev 292152)
+++ trunk/Source/WebKit/SourcesWPE.txt	2022-03-31 11:39:22 UTC (rev 292153)
@@ -21,8 +21,8 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 // THE POSSIBILITY OF SUCH DAMAGE.
 
-GPUProcess/gstreamer/GPUProcessGStreamer.cpp
-GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp
+GPUProcess/glib/GPUProcessGLib.cpp
+GPUProcess/glib/GPUProcessMainGLib.cpp
 
 GPUProcess/media/RemoteAudioDestinationManager.cpp
 

Modified: trunk/Source/WebKit/webkitglib-symbols.map (292152 => 292153)


--- trunk/Source/WebKit/webkitglib-symbols.map	2022-03-31 11:17:14 UTC (rev 292152)
+++ trunk/Source/WebKit/webkitglib-symbols.map	2022-03-31 11:39:22 UTC (rev 292153)
@@ -4,6 +4,7 @@
   webkit_*;
   extern "C++" {
     "bmalloc::vmPageSize()::cached";
+    "WebKit::GPUProcessMain(int, char**)";
     "WebKit::NetworkProcessMain(int, char**)";
     "WebKit::WebKitExtensionManager::initialize(WebKit::InjectedBundle*, API::Object*)";
     "WebKit::WebKitExtensionManager::singleton()";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to