[PlayStation] Turn on WebP support
https://bugs.webkit.org/show_bug.cgi?id=241887

Reviewed by Ross Kirsling.

Turn USE_WEBP to ON. Load WebP as a shared library if applicable.

* Source/WebKit/WebProcess/EntryPoint/playstation/WebProcessMain.cpp:
* Source/cmake/OptionsPlayStation.cmake:
* Tools/MiniBrowser/playstation/main.cpp:
* Tools/TestWebKitAPI/playstation/main.cpp:

Canonical link: https://commits.webkit.org/251765@main


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@295760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/WebProcess/EntryPoint/playstation/WebProcessMain.cpp b/Source/WebKit/WebProcess/EntryPoint/playstation/WebProcessMain.cpp
index 265f2d9..5be54e3 100644
--- a/Source/WebKit/WebProcess/EntryPoint/playstation/WebProcessMain.cpp
+++ b/Source/WebKit/WebProcess/EntryPoint/playstation/WebProcessMain.cpp
@@ -47,8 +47,11 @@
         exit(EXIT_FAILURE);
     }
 
-    loadLibraryOrExit(PNG_LOAD_AT);
     loadLibraryOrExit(ICU_LOAD_AT);
+    loadLibraryOrExit(PNG_LOAD_AT);
+#if defined(WebP_LOAD_AT)
+    loadLibraryOrExit(WebP_LOAD_AT);
+#endif
     loadLibraryOrExit(Freetype_LOAD_AT);
     loadLibraryOrExit(Fontconfig_LOAD_AT);
     loadLibraryOrExit(HarfBuzz_LOAD_AT);
diff --git a/Source/cmake/OptionsPlayStation.cmake b/Source/cmake/OptionsPlayStation.cmake
index 73434b8..0d0990e 100644
--- a/Source/cmake/OptionsPlayStation.cmake
+++ b/Source/cmake/OptionsPlayStation.cmake
@@ -234,6 +234,7 @@
 SET_AND_EXPOSE_TO_BUILD(USE_HARFBUZZ ON)
 SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE ON)
 SET_AND_EXPOSE_TO_BUILD(USE_OPENSSL ON)
+SET_AND_EXPOSE_TO_BUILD(USE_WEBP ON)
 SET_AND_EXPOSE_TO_BUILD(USE_WPE_RENDERER OFF)
 
 SET_AND_EXPOSE_TO_BUILD(USE_INSPECTOR_SOCKET_SERVER ${ENABLE_REMOTE_INSPECTOR})
diff --git a/Tools/MiniBrowser/playstation/main.cpp b/Tools/MiniBrowser/playstation/main.cpp
index 26538f5..b7976e2 100644
--- a/Tools/MiniBrowser/playstation/main.cpp
+++ b/Tools/MiniBrowser/playstation/main.cpp
@@ -48,8 +48,11 @@
     loadLibraryOrExit("PosixWebKit");
     setenv_np("WebInspectorServerPort", "868", 1);
 
-    loadLibraryOrExit(PNG_LOAD_AT);
     loadLibraryOrExit(ICU_LOAD_AT);
+    loadLibraryOrExit(PNG_LOAD_AT);
+#if defined(WebP_LOAD_AT)
+    loadLibraryOrExit(WebP_LOAD_AT);
+#endif
     loadLibraryOrExit(Fontconfig_LOAD_AT);
     loadLibraryOrExit(Freetype_LOAD_AT);
     loadLibraryOrExit(HarfBuzz_LOAD_AT);
diff --git a/Tools/TestWebKitAPI/playstation/main.cpp b/Tools/TestWebKitAPI/playstation/main.cpp
index 8221d7f..69dad53 100644
--- a/Tools/TestWebKitAPI/playstation/main.cpp
+++ b/Tools/TestWebKitAPI/playstation/main.cpp
@@ -41,6 +41,9 @@
     loadLibraryOrExit(ICU_LOAD_AT);
 #if defined(BUILDING_TestWebCore) || defined(BUILDING_TestWebKit)
     loadLibraryOrExit(PNG_LOAD_AT);
+#if defined(WebP_LOAD_AT)
+    loadLibraryOrExit(WebP_LOAD_AT);
+#endif
     loadLibraryOrExit(Fontconfig_LOAD_AT);
     loadLibraryOrExit(Freetype_LOAD_AT);
     loadLibraryOrExit(HarfBuzz_LOAD_AT);