Title: [270940] trunk/Source/WebCore
Revision
270940
Author
hironori.fu...@sony.com
Date
2020-12-17 12:30:28 -0800 (Thu, 17 Dec 2020)

Log Message

[CMake] Unify WebGL source files into the common WebCore/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=219970

Reviewed by Don Olmstead.

CMake build scripts should have a single place to list WebGL
source files to ease WebGL devs.

After all ports will switch to use GraphicsContextGLANGLE.cpp,
those files can be added to the common Sources.txt.

GraphicsContextGLOpenGLPrivate is used only by AppleWin port.
Enclosed by #if PLATFORM(WIN) && USE(CA).

* CMakeLists.txt:
* PlatformFTW.cmake:
* PlatformGTK.cmake:
* PlatformPlayStation.cmake:
* PlatformWin.cmake:
* SourcesGTK.txt:
* SourcesWPE.txt:
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (270939 => 270940)


--- trunk/Source/WebCore/CMakeLists.txt	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/CMakeLists.txt	2020-12-17 20:30:28 UTC (rev 270940)
@@ -1623,11 +1623,42 @@
 
 if (ENABLE_WEBGL)
     list(APPEND WebCore_SOURCES
-        platform/graphics/ANGLEWebKitBridge.cpp
         platform/graphics/FormatConverter.cpp
-        platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
     )
 
+    if (USE_ANGLE_WEBGL)
+        list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
+            ${WEBCORE_DIR}/platform/graphics/angle
+        )
+        list(APPEND WebCore_SOURCES
+            platform/graphics/angle/ExtensionsGLANGLE.cpp
+            platform/graphics/angle/GraphicsContextGLANGLE.cpp
+            platform/graphics/angle/TemporaryANGLESetting.cpp
+        )
+    else ()
+        list(APPEND WebCore_SOURCES
+            platform/graphics/ANGLEWebKitBridge.cpp
+
+            platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+            platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+            platform/graphics/opengl/TemporaryOpenGLSetting.cpp
+        )
+
+        if (USE_OPENGL_ES)
+            list(APPEND WebCore_SOURCES
+                platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
+                platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
+            )
+        endif ()
+
+        if (USE_OPENGL)
+            list(APPEND WebCore_SOURCES
+                platform/graphics/opengl/ExtensionsGLOpenGL.cpp
+                platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
+            )
+        endif ()
+    endif ()
+
     list(APPEND WebCore_LIBRARIES ANGLEFramework)
     list(APPEND WebCoreTestSupport_LIBRARIES ANGLEFramework)
 

Modified: trunk/Source/WebCore/ChangeLog (270939 => 270940)


--- trunk/Source/WebCore/ChangeLog	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/ChangeLog	2020-12-17 20:30:28 UTC (rev 270940)
@@ -1,3 +1,31 @@
+2020-12-17  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [CMake] Unify WebGL source files into the common WebCore/CMakeLists.txt
+        https://bugs.webkit.org/show_bug.cgi?id=219970
+
+        Reviewed by Don Olmstead.
+
+        CMake build scripts should have a single place to list WebGL
+        source files to ease WebGL devs.
+
+        After all ports will switch to use GraphicsContextGLANGLE.cpp,
+        those files can be added to the common Sources.txt.
+
+        GraphicsContextGLOpenGLPrivate is used only by AppleWin port.
+        Enclosed by #if PLATFORM(WIN) && USE(CA).
+
+        * CMakeLists.txt:
+        * PlatformFTW.cmake:
+        * PlatformGTK.cmake:
+        * PlatformPlayStation.cmake:
+        * PlatformWin.cmake:
+        * SourcesGTK.txt:
+        * SourcesWPE.txt:
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp:
+        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h:
+        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
+
 2020-12-17  Eric Carlson  <eric.carl...@apple.com>
 
         [Cocoa] WebM format reader doesn't work with a url in a <source> element

Modified: trunk/Source/WebCore/PlatformFTW.cmake (270939 => 270940)


--- trunk/Source/WebCore/PlatformFTW.cmake	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/PlatformFTW.cmake	2020-12-17 20:30:28 UTC (rev 270940)
@@ -52,13 +52,6 @@
 
     platform/graphics/egl/GLContextEGL.cpp
 
-    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
-    platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
-    platform/graphics/opengl/TemporaryOpenGLSetting.cpp
-
     platform/graphics/opentype/OpenTypeUtilities.cpp
 
     platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp

Modified: trunk/Source/WebCore/PlatformGTK.cmake (270939 => 270940)


--- trunk/Source/WebCore/PlatformGTK.cmake	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/PlatformGTK.cmake	2020-12-17 20:30:28 UTC (rev 270940)
@@ -44,12 +44,6 @@
     "${WEBCORE_DIR}/platform/text/gtk"
 )
 
-if (USE_ANGLE_WEBGL)
-    list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
-        "${WEBCORE_DIR}/platform/graphics/angle"
-    )
-endif ()
-
 if (USE_WPE_RENDERER)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/graphics/libwpe"
@@ -126,34 +120,6 @@
     )
 endif ()
 
-if (USE_ANGLE_WEBGL)
-    list(APPEND WebCore_SOURCES
-        platform/graphics/angle/ExtensionsGLANGLE.cpp
-        platform/graphics/angle/GraphicsContextGLANGLE.cpp
-        platform/graphics/angle/TemporaryANGLESetting.cpp
-    )
-else ()
-    list(APPEND WebCore_SOURCES
-        platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
-        platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
-        platform/graphics/opengl/TemporaryOpenGLSetting.cpp
-    )
-
-    if (USE_OPENGL_ES)
-        list(APPEND WebCore_SOURCES
-            platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
-            platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
-        )
-    endif ()
-
-    if (USE_OPENGL)
-        list(APPEND WebCore_SOURCES
-            platform/graphics/opengl/ExtensionsGLOpenGL.cpp
-            platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
-        )
-    endif ()
-endif ()
-
 if (ENABLE_WAYLAND_TARGET)
     list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
         platform/graphics/wayland/PlatformDisplayWayland.h

Modified: trunk/Source/WebCore/PlatformPlayStation.cmake (270939 => 270940)


--- trunk/Source/WebCore/PlatformPlayStation.cmake	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/PlatformPlayStation.cmake	2020-12-17 20:30:28 UTC (rev 270940)
@@ -42,13 +42,6 @@
 
     platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
-    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
-    platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
-    platform/graphics/opengl/TemporaryOpenGLSetting.cpp
-
     platform/libwpe/PasteboardLibWPE.cpp
     platform/libwpe/PlatformKeyboardEventLibWPE.cpp
     platform/libwpe/PlatformPasteboardLibWPE.cpp

Modified: trunk/Source/WebCore/PlatformWin.cmake (270939 => 270940)


--- trunk/Source/WebCore/PlatformWin.cmake	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/PlatformWin.cmake	2020-12-17 20:30:28 UTC (rev 270940)
@@ -6,7 +6,6 @@
     "${WEBCORE_DIR}/accessibility/win"
     "${WEBCORE_DIR}/page/win"
     "${WEBCORE_DIR}/platform/graphics/egl"
-    "${WEBCORE_DIR}/platform/graphics/angle"
     "${WEBCORE_DIR}/platform/graphics/opengl"
     "${WEBCORE_DIR}/platform/graphics/opentype"
     "${WEBCORE_DIR}/platform/graphics/win"
@@ -38,10 +37,6 @@
 
     platform/audio/PlatformMediaSessionManager.cpp
 
-    platform/graphics/angle/ExtensionsGLANGLE.cpp
-    platform/graphics/angle/GraphicsContextGLANGLE.cpp
-    platform/graphics/angle/TemporaryANGLESetting.cpp
-
     platform/graphics/egl/GLContextEGL.cpp
 
     platform/graphics/opengl/TemporaryOpenGLSetting.cpp

Modified: trunk/Source/WebCore/SourcesGTK.txt (270939 => 270940)


--- trunk/Source/WebCore/SourcesGTK.txt	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/SourcesGTK.txt	2020-12-17 20:30:28 UTC (rev 270940)
@@ -93,8 +93,6 @@
 
 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
-platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
-
 platform/graphics/opentype/OpenTypeVerticalData.cpp
 
 platform/graphics/wayland/PlatformDisplayWayland.cpp

Modified: trunk/Source/WebCore/SourcesWPE.txt (270939 => 270940)


--- trunk/Source/WebCore/SourcesWPE.txt	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/SourcesWPE.txt	2020-12-17 20:30:28 UTC (rev 270940)
@@ -73,13 +73,6 @@
 
 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
-platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
-platform/graphics/opengl/ExtensionsGLOpenGLES.cpp @no-unify
-platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
-platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
-platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
-platform/graphics/opengl/TemporaryOpenGLSetting.cpp
-
 platform/graphics/opentype/OpenTypeVerticalData.cpp
 
 platform/libwpe/PasteboardLibWPE.cpp

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (270939 => 270940)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-12-17 20:30:28 UTC (rev 270940)
@@ -728,13 +728,13 @@
     // Errors raised by synthesizeGLError().
     ListHashSet<GCGLenum> m_syntheticErrors;
 
-#if USE(NICOSIA) && USE(TEXTURE_MAPPER)
+#if USE(NICOSIA)
     friend class Nicosia::GCGLLayer;
     std::unique_ptr<Nicosia::GCGLLayer> m_nicosiaLayer;
 #elif USE(TEXTURE_MAPPER)
     friend class TextureMapperGCGLPlatformLayer;
     std::unique_ptr<TextureMapperGCGLPlatformLayer> m_texmapLayer;
-#elif !PLATFORM(COCOA)
+#elif PLATFORM(WIN) && USE(CA)
     friend class GraphicsContextGLOpenGLPrivate;
     std::unique_ptr<GraphicsContextGLOpenGLPrivate> m_private;
 #endif

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp (270939 => 270940)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp	2020-12-17 20:30:28 UTC (rev 270940)
@@ -19,23 +19,14 @@
 
 #include "config.h"
 
-#if ENABLE(WEBGL)
+#if ENABLE(WEBGL) && PLATFORM(WIN) && USE(CA)
 #include "GraphicsContextGLOpenGLPrivate.h"
 
 #include "HostWindow.h"
-#include <wtf/StdLibExtras.h>
-
-
-#if USE(LIBEPOXY)
-#include <epoxy/gl.h>
-#elif USE(OPENGL_ES)
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
-#else
-#include "OpenGLShims.h"
-#endif
+#include <wtf/StdLibExtras.h>
 
-
 namespace WebCore {
 
 GraphicsContextGLOpenGLPrivate::GraphicsContextGLOpenGLPrivate(GraphicsContextGLOpenGL*, GraphicsContextGLOpenGL::Destination destination)
@@ -64,4 +55,4 @@
 
 } // namespace WebCore
 
-#endif // ENABLE(WEBGL)
+#endif // ENABLE(WEBGL) && PLATFORM(WIN) && USE(CA)

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h (270939 => 270940)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h	2020-12-17 20:30:28 UTC (rev 270940)
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#if PLATFORM(WIN) && USE(CA)
+
 #include "GLContext.h"
 #include "GraphicsContextGLOpenGL.h"
 
@@ -39,3 +41,5 @@
 };
 
 }
+
+#endif

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp (270939 => 270940)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2020-12-17 20:14:24 UTC (rev 270939)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2020-12-17 20:30:28 UTC (rev 270940)
@@ -31,7 +31,7 @@
 
 #if ENABLE(WEBGL) && USE(TEXTURE_MAPPER)
 
-#include "GraphicsContextGLOpenGLPrivate.h"
+#include "GLContext.h"
 #include "TextureMapperGCGLPlatformLayer.h"
 #include <ANGLE/ShaderLang.h>
 #include <wtf/Deque.h>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to