[WinCairo] Fix build break after updating ANGLE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Apr 2017 23:11:52 +0000 (23:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Apr 2017 23:11:52 +0000 (23:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170980

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-04-20
Reviewed by Brent Fulgham.

Source/ThirdParty/ANGLE:

* CMakeLists.txt: Added some new source files.
* PlatformMac.cmake: Ditto.
* PlatformWin.cmake: Ditto. Remove a macro 'ANGLE_WEBKIT_WIN'
because SoftLinking is not used anymore.
* src/third_party/systeminfo/: Restored.

Source/WebCore:

By stopping using SoftLinking for ANGLE, some changes are needed
for WebCore and WebKit.
  - Define a macro 'GL_GLEXT_PROTOTYPES' before #include <GLES2/gl2.h> or <GLES2/gl2ext.h>.
  - Link libEGL import library explicitly.

* PlatformWin.cmake: Link libEGL to WebCore.
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::initializeEGLDisplay): Removed the code for SoftLinking.
* platform/graphics/GLContext.cpp: Define GL_GLEXT_PROTOTYPES.
* platform/graphics/egl/GLContextEGL.cpp: Ditto.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Ditto.
* platform/graphics/opengl/Extensions3DOpenGLES.h: Ditto.
* platform/graphics/opengl/TemporaryOpenGLSetting.cpp: Ditto.
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: Ditto.

Source/WebKit/win:

* WebCoreSupport/AcceleratedCompositingContext.cpp: Define GL_GLEXT_PROTOTYPES.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/ThirdParty/ANGLE/CMakeLists.txt
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/PlatformMac.cmake
Source/ThirdParty/ANGLE/PlatformWin.cmake
Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebCore/platform/graphics/GLContext.cpp
Source/WebCore/platform/graphics/PlatformDisplay.cpp
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h
Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp

index 7dc9953..fb4a011 100644 (file)
@@ -42,9 +42,6 @@ set(ANGLE_SOURCES
     src/common/mathutil.cpp
     src/common/MemoryBuffer.cpp
     src/common/string_utils.cpp
-    src/common/system_utils_linux.cpp
-    src/common/system_utils_mac.cpp
-    src/common/system_utils_win.cpp
     src/common/tls.cpp
     src/common/utilities.cpp
     src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -156,6 +153,7 @@ set(ANGLE_SOURCES
     src/libANGLE/Device.cpp
     src/libANGLE/Display.cpp
     src/libANGLE/Error.cpp
+    src/libANGLE/es3_copy_conversion_table_autogen.cpp
     src/libANGLE/Fence.cpp
     src/libANGLE/format_map_autogen.cpp
     src/libANGLE/formatutils.cpp
@@ -166,6 +164,7 @@ set(ANGLE_SOURCES
     src/libANGLE/Image.cpp
     src/libANGLE/ImageIndex.cpp
     src/libANGLE/IndexRangeCache.cpp
+    src/libANGLE/LoggingAnnotator.cpp
     src/libANGLE/Path.cpp
     src/libANGLE/Platform.cpp
     src/libANGLE/Program.cpp
@@ -176,10 +175,12 @@ set(ANGLE_SOURCES
     src/libANGLE/renderer/ContextImpl.cpp
     src/libANGLE/renderer/DeviceImpl.cpp
     src/libANGLE/renderer/DisplayImpl.cpp
-    src/libANGLE/renderer/load_functions_table_autogen.cpp
-    src/libANGLE/renderer/renderer_utils.cpp
+    src/libANGLE/renderer/Format_table_autogen.cpp
     src/libANGLE/renderer/SurfaceImpl.cpp
     src/libANGLE/renderer/TextureImpl.cpp
+    src/libANGLE/renderer/load_functions_table_autogen.cpp
+    src/libANGLE/renderer/renderer_utils.cpp
+    src/libANGLE/renderer/driver_utils.cpp
     src/libANGLE/ResourceManager.cpp
     src/libANGLE/Sampler.cpp
     src/libANGLE/Shader.cpp
@@ -187,15 +188,19 @@ set(ANGLE_SOURCES
     src/libANGLE/Stream.cpp
     src/libANGLE/Surface.cpp
     src/libANGLE/Texture.cpp
+    src/libANGLE/Thread.cpp
     src/libANGLE/TransformFeedback.cpp
     src/libANGLE/Uniform.cpp
+    src/libANGLE/UniformLinker.cpp
     src/libANGLE/validationEGL.cpp
     src/libANGLE/validationES.cpp
     src/libANGLE/validationES2.cpp
     src/libANGLE/validationES3.cpp
     src/libANGLE/validationES31.cpp
+    src/libANGLE/VaryingPacking.cpp
     src/libANGLE/VertexArray.cpp
     src/libANGLE/VertexAttribute.cpp
+    src/libANGLE/WorkerThread.cpp
     src/third_party/compiler/ArrayBoundsClamper.cpp
 )
 
index 5a0ebf8..e4ef518 100644 (file)
@@ -1,3 +1,16 @@
+2017-04-20  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [WinCairo] Fix build break after updating ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=170980
+
+        Reviewed by Brent Fulgham.
+
+        * CMakeLists.txt: Added some new source files.
+        * PlatformMac.cmake: Ditto.
+        * PlatformWin.cmake: Ditto. Remove a macro 'ANGLE_WEBKIT_WIN'
+        because SoftLinking is not used anymore.
+        * src/third_party/systeminfo/: Restored.
+
 2017-04-19  Ryan Haddad  <ryanhaddad@apple.com>
 
         Remove executable property from a header file.
index afecab2..676b676 100644 (file)
@@ -1,4 +1,5 @@
 list(APPEND ANGLE_SOURCES
+    src/common/system_utils_mac.cpp
     src/libANGLE/renderer/gl/cgl/DisplayCGL.mm
     src/libANGLE/renderer/gl/cgl/PbufferSurfaceCGL.mm
     src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
index dc8a1a3..9faea20 100644 (file)
@@ -18,7 +18,6 @@ list(APPEND ANGLEEGL_SOURCES
 )
 
 list(APPEND ANGLEEGL_COMPILE_DEFINITIONS
-    ANGLE_WEBKIT_WIN
     __STDC_CONSTANT_MACROS
 )
 
@@ -28,7 +27,6 @@ list(APPEND ANGLEGLESv2_SOURCES
 )
 
 list(APPEND ANGLEGLESv2_COMPILE_DEFINITIONS
-    ANGLE_WEBKIT_WIN
     __STDC_CONSTANT_MACROS
     __STDC_LIMIT_MACROS
 )
@@ -38,6 +36,7 @@ list(APPEND ANGLEGLESv2_LIBRARIES
 )
 
 list(APPEND ANGLE_SOURCES
+    src/common/system_utils_win.cpp
     src/compiler/translator/ASTMetadataHLSL.cpp
     src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
     src/compiler/translator/OutputHLSL.cpp
@@ -50,6 +49,7 @@ list(APPEND ANGLE_SOURCES
     src/compiler/translator/blocklayoutHLSL.cpp
     src/libANGLE/renderer/d3d/BufferD3D.cpp
     src/libANGLE/renderer/d3d/CompilerD3D.cpp
+    src/libANGLE/renderer/d3d/SwapChainD3D.cpp
     src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
     src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
     src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
@@ -121,6 +121,8 @@ list(APPEND ANGLE_SOURCES
     src/libANGLE/renderer/d3d/TextureD3D.cpp
     src/libANGLE/renderer/d3d/VertexBuffer.cpp
     src/libANGLE/renderer/d3d/VertexDataManager.cpp
+    src/third_party/murmurhash/MurmurHash3.cpp
+    src/third_party/systeminfo/SystemInfo.cpp
 )
 
 list(APPEND ANGLE_COMPILE_DEFINITIONS
@@ -131,5 +133,4 @@ list(APPEND ANGLE_COMPILE_DEFINITIONS
     ANGLE_SKIP_DXGI_1_2_CHECK=1
     __STDC_CONSTANT_MACROS
     __STDC_LIMIT_MACROS
-    ANGLE_WEBKIT_WIN
 )
diff --git a/Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.cpp b/Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.cpp
new file mode 100644 (file)
index 0000000..97dfcaa
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * 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 APPLE INC. ``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
+ * 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 <windows.h>
+#include "common/platform.h"
+
+#if _WIN32_WINNT_WINBLUE
+#include <versionhelpers.h>
+#endif
+
+namespace rx {
+
+#ifndef _WIN32_WINNT_WINBLUE
+static bool IsWindowsVistaOrGreater()
+{
+    OSVERSIONINFOEXW osvi = { };
+    osvi.dwOSVersionInfoSize = sizeof(osvi);
+    osvi.dwMajorVersion = HIBYTE(_WIN32_WINNT_VISTA);
+    osvi.dwMinorVersion = LOBYTE(_WIN32_WINNT_VISTA);
+    DWORDLONG condition = 0;
+    VER_SET_CONDITION(condition, VER_MAJORVERSION, VER_GREATER_EQUAL);
+    VER_SET_CONDITION(condition, VER_MINORVERSION, VER_GREATER_EQUAL);
+    return !!::VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION, condition);
+}
+#endif
+
+bool isWindowsVistaOrGreater()
+{
+    static bool initialized = false;
+    static bool cachedIsWindowsVistaOrGreater;
+
+    if (!initialized) {
+        initialized = true;
+#if defined(ANGLE_ENABLE_WINDOWS_STORE)
+        cachedIsWindowsVistaOrGreater = true;
+#else
+        cachedIsWindowsVistaOrGreater = IsWindowsVistaOrGreater();
+#endif
+    }
+    return cachedIsWindowsVistaOrGreater;
+}
+
+} // namespace rx
diff --git a/Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.h b/Source/ThirdParty/ANGLE/src/third_party/systeminfo/SystemInfo.h
new file mode 100644 (file)
index 0000000..226085f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * 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 APPLE INC. ``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
+ * 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.
+ */
+
+#ifndef THIRD_PARTY_SYSTEMINFO_SYSTEMINFO_H_
+#define THIRD_PARTY_SYSTEMINFO_SYSTEMINFO_H_
+
+namespace rx {
+
+bool isWindowsVistaOrGreater();
+
+} // namespace rx
+
+#endif // THIRD_PARTY_SYSTEMINFO_SYSTEMINFO_H_
index 3c18248..f45b55f 100644 (file)
@@ -1,3 +1,25 @@
+2017-04-20  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [WinCairo] Fix build break after updating ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=170980
+
+        Reviewed by Brent Fulgham.
+
+        By stopping using SoftLinking for ANGLE, some changes are needed
+        for WebCore and WebKit.
+          - Define a macro 'GL_GLEXT_PROTOTYPES' before #include <GLES2/gl2.h> or <GLES2/gl2ext.h>.
+          - Link libEGL import library explicitly.
+
+        * PlatformWin.cmake: Link libEGL to WebCore.
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::initializeEGLDisplay): Removed the code for SoftLinking.
+        * platform/graphics/GLContext.cpp: Define GL_GLEXT_PROTOTYPES.
+        * platform/graphics/egl/GLContextEGL.cpp: Ditto.
+        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Ditto.
+        * platform/graphics/opengl/Extensions3DOpenGLES.h: Ditto.
+        * platform/graphics/opengl/TemporaryOpenGLSetting.cpp: Ditto.
+        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: Ditto.
+
 2017-04-20  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: Add regular expression support to XHR breakpoints
index 0a3fbb2..bf1b718 100644 (file)
@@ -318,4 +318,7 @@ set(WebCore_OUTPUT_NAME
 )
 
 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
+if (TARGET libEGL)
+    list(APPEND WebCore_LIBRARIES libEGL)
+endif ()
 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})
index 67d60ce..70f5873 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #if USE(OPENGL_ES_2)
+#define GL_GLEXT_PROTOTYPES 1
 #include <GLES2/gl2.h>
 #include <GLES3/gl3.h>
 #endif
index fabf030..67efbce 100644 (file)
@@ -184,12 +184,6 @@ void PlatformDisplay::initializeEGLDisplay()
     m_eglDisplayInitialized = true;
 
     if (m_eglDisplay == EGL_NO_DISPLAY) {
-        // EGL is optionally soft linked on Windows.
-#if PLATFORM(WIN)
-        auto eglGetDisplay = eglGetDisplayPtr();
-        if (!eglGetDisplay)
-            return;
-#endif
         m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
         if (m_eglDisplay == EGL_NO_DISPLAY)
             return;
index a086efa..1c1cec2 100644 (file)
@@ -30,6 +30,7 @@
 #endif
 
 #if USE(OPENGL_ES_2)
+#define GL_GLEXT_PROTOTYPES 1
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #else
index d28d765..4fcd709 100644 (file)
@@ -38,6 +38,7 @@
 #else
 #if USE(OPENGL_ES_2)
 #include "OpenGLESShims.h"
+#define GL_GLEXT_PROTOTYPES 1
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #elif PLATFORM(MAC)
index 7438d9e..eac31e7 100644 (file)
@@ -30,6 +30,7 @@
 #include "TemporaryOpenGLSetting.h"
 
 #if USE(OPENGL_ES_2)
+#define GL_GLEXT_PROTOTYPES 1
 #include <GLES2/gl2.h>
 #include "OpenGLESShims.h"
 #elif PLATFORM(IOS)
index ce8b312..f8777ae 100644 (file)
@@ -1,3 +1,12 @@
+2017-04-20  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [WinCairo] Fix build break after updating ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=170980
+
+        Reviewed by Brent Fulgham.
+
+        * WebCoreSupport/AcceleratedCompositingContext.cpp: Define GL_GLEXT_PROTOTYPES.
+
 2017-04-19  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] REGRESSION(r215486): Windows Release build is broken
index 5e16e20..9d6671b 100644 (file)
@@ -44,6 +44,7 @@
 #include <WebCore/TextureMapperLayer.h>
 
 #if USE(OPENGL_ES_2)
+#define GL_GLEXT_PROTOTYPES 1
 #include <GLES2/gl2.h>
 #else
 #include <GL/gl.h>