<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[187928] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/187928">187928</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2015-08-04 18:15:22 -0700 (Tue, 04 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Soft link libGLESv2 and libEGL on Windows again
https://bugs.webkit.org/show_bug.cgi?id=147671

Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

* CMakeLists.txt:
Clean up some warnings when compiling with CMake.
* include/EGL/egl.h:
* include/EGL/eglsoftlinking.h:
* include/GLES2/gl2.h:
Soft link egl optionally.

Source/WebCore:

* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::initializeEGLDisplay):
Fail gracefully if libEGL is not found.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceThirdPartyANGLECMakeListstxt">trunk/Source/ThirdParty/ANGLE/CMakeLists.txt</a></li>
<li><a href="#trunkSourceThirdPartyANGLEChangeLog">trunk/Source/ThirdParty/ANGLE/ChangeLog</a></li>
<li><a href="#trunkSourceThirdPartyANGLEincludeEGLeglh">trunk/Source/ThirdParty/ANGLE/include/EGL/egl.h</a></li>
<li><a href="#trunkSourceThirdPartyANGLEincludeEGLeglsoftlinkingh">trunk/Source/ThirdParty/ANGLE/include/EGL/eglsoftlinking.h</a></li>
<li><a href="#trunkSourceThirdPartyANGLEincludeGLES2gl2h">trunk/Source/ThirdParty/ANGLE/include/GLES2/gl2.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPlatformDisplaycpp">trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceThirdPartyANGLECMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/ANGLE/CMakeLists.txt (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/ANGLE/CMakeLists.txt        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/ThirdParty/ANGLE/CMakeLists.txt        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -20,8 +20,15 @@
</span><span class="cx"> 
</span><span class="cx"> add_library(libEGL SHARED
</span><span class="cx">     src/libEGL/libEGL.cpp
</span><ins>+    src/libEGL/libEGL.def
+    src/libEGL/libEGL.rc
</ins><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set_property(TARGET libEGL PROPERTY COMPILE_DEFINITIONS
+    ANGLE_WEBKIT_WIN
+    EGLAPI=
+)
+
</ins><span class="cx"> add_library(libGLESv2 SHARED
</span><span class="cx">     src/libGLESv2/entry_points_egl.cpp
</span><span class="cx">     src/libGLESv2/entry_points_egl_ext.cpp
</span><span class="lines">@@ -31,8 +38,16 @@
</span><span class="cx">     src/libGLESv2/entry_points_gles_3_0_ext.cpp
</span><span class="cx">     src/libGLESv2/global_state.cpp
</span><span class="cx">     src/libGLESv2/libGLESv2.cpp
</span><ins>+    src/libGLESv2/libGLESv2.def
+    src/libGLESv2/libGLESv2.rc
</ins><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set_property(TARGET libEGL PROPERTY COMPILE_DEFINITIONS
+    ANGLE_WEBKIT_WIN
+    GL_APICALL=
+    LIBGLESV2_IMPLEMENTATION
+)
+
</ins><span class="cx"> add_library(libANGLE STATIC
</span><span class="cx">     src/common/angleutils.cpp
</span><span class="cx">     src/common/debug.cpp
</span></span></pre></div>
<a id="trunkSourceThirdPartyANGLEChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/ANGLE/ChangeLog        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2015-08-04  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Soft link libGLESv2 and libEGL on Windows again
+        https://bugs.webkit.org/show_bug.cgi?id=147671
+
+        Reviewed by Dean Jackson.
+
+        * CMakeLists.txt:
+        Clean up some warnings when compiling with CMake.
+        * include/EGL/egl.h:
+        * include/EGL/eglsoftlinking.h:
+        * include/GLES2/gl2.h:
+        Soft link egl optionally.
+
+2015-08-04  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
</ins><span class="cx">         Enable WebGL on Windows CMake build.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=143311
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceThirdPartyANGLEincludeEGLeglh"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/ANGLE/include/EGL/egl.h (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/ANGLE/include/EGL/egl.h        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/ThirdParty/ANGLE/include/EGL/egl.h        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -38,6 +38,12 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;EGL/eglplatform.h&gt;
</span><span class="cx"> 
</span><ins>+#if defined(_MSC_VER) &amp;&amp; !defined(ANGLE_WEBKIT_WIN)
+#define EGL_SOFT_LINKING 1
+#else
+#define EGL_SOFT_LINKING 0
+#endif
+
</ins><span class="cx"> /* Generated on date 20150102 */
</span><span class="cx"> 
</span><span class="cx"> /* Generated C header for:
</span><span class="lines">@@ -118,6 +124,7 @@
</span><span class="cx"> #define EGL_VERSION                       0x3054
</span><span class="cx"> #define EGL_WIDTH                         0x3057
</span><span class="cx"> #define EGL_WINDOW_BIT                    0x0004
</span><ins>+#if !EGL_SOFT_LINKING
</ins><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
</span><span class="cx"> EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
</span><span class="lines">@@ -142,6 +149,7 @@
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
</span><ins>+#endif
</ins><span class="cx"> #endif /* EGL_VERSION_1_0 */
</span><span class="cx"> 
</span><span class="cx"> #ifndef EGL_VERSION_1_1
</span><span class="lines">@@ -160,10 +168,12 @@
</span><span class="cx"> #define EGL_TEXTURE_RGB                   0x305D
</span><span class="cx"> #define EGL_TEXTURE_RGBA                  0x305E
</span><span class="cx"> #define EGL_TEXTURE_TARGET                0x3081
</span><ins>+#if !EGL_SOFT_LINKING
</ins><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
</span><ins>+#endif
</ins><span class="cx"> #endif /* EGL_VERSION_1_1 */
</span><span class="cx"> 
</span><span class="cx"> #ifndef EGL_VERSION_1_2
</span><span class="lines">@@ -199,11 +209,13 @@
</span><span class="cx"> #define EGL_SWAP_BEHAVIOR                 0x3093
</span><span class="cx"> #define EGL_UNKNOWN                       ((EGLint)-1)
</span><span class="cx"> #define EGL_VERTICAL_RESOLUTION           0x3091
</span><ins>+#if !EGL_SOFT_LINKING
</ins><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
</span><span class="cx"> EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
</span><span class="cx"> EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
</span><ins>+#endif
</ins><span class="cx"> #endif /* EGL_VERSION_1_2 */
</span><span class="cx"> 
</span><span class="cx"> #ifndef EGL_VERSION_1_3
</span><span class="lines">@@ -232,7 +244,9 @@
</span><span class="cx"> #define EGL_OPENGL_API                    0x30A2
</span><span class="cx"> #define EGL_OPENGL_BIT                    0x0008
</span><span class="cx"> #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT   0x0400
</span><ins>+#if !EGL_SOFT_LINKING
</ins><span class="cx"> EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
</span><ins>+#endif
</ins><span class="cx"> #endif /* EGL_VERSION_1_4 */
</span><span class="cx"> 
</span><span class="cx"> #ifndef EGL_VERSION_1_5
</span><span class="lines">@@ -284,6 +298,7 @@
</span><span class="cx"> #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
</span><span class="cx"> #define EGL_IMAGE_PRESERVED               0x30D2
</span><span class="cx"> #define EGL_NO_IMAGE                      ((EGLImage)0)
</span><ins>+#if !EGL_SOFT_LINKING
</ins><span class="cx"> EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
</span><span class="cx"> EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
</span><span class="lines">@@ -294,8 +309,13 @@
</span><span class="cx"> EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
</span><span class="cx"> EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
</span><span class="cx"> EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
</span><ins>+#endif
</ins><span class="cx"> #endif /* EGL_VERSION_1_5 */
</span><span class="cx"> 
</span><ins>+#if EGL_SOFT_LINKING
+#include &lt;EGL/eglsoftlinking.h&gt;
+#endif
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceThirdPartyANGLEincludeEGLeglsoftlinkingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/ANGLE/include/EGL/eglsoftlinking.h (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/ANGLE/include/EGL/eglsoftlinking.h        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/ThirdParty/ANGLE/include/EGL/eglsoftlinking.h        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> SOFT_LINK_LIBRARY(libEGL)
</span><span class="cx"> 
</span><span class="cx"> SOFT_LINK(libEGL, eglGetError, EGLint, EGLAPIENTRY, (void), ());
</span><del>-SOFT_LINK(libEGL, eglGetDisplay, EGLDisplay, EGLAPIENTRY, (EGLNativeDisplayType display_id), (display_id));
</del><ins>+SOFT_LINK_OPTIONAL(libEGL, eglGetDisplay, EGLDisplay, EGLAPIENTRY, (EGLNativeDisplayType display_id));
</ins><span class="cx"> SOFT_LINK(libEGL, eglInitialize, EGLBoolean, EGLAPIENTRY, (EGLDisplay dpy, EGLint *major, EGLint *minor), (dpy, major, minor));
</span><span class="cx"> SOFT_LINK(libEGL, eglTerminate, EGLBoolean, EGLAPIENTRY, (EGLDisplay dpy), (dpy));
</span><span class="cx"> SOFT_LINK(libEGL, eglQueryString, const char *, EGLAPIENTRY, (EGLDisplay dpy, EGLint name), (dpy, name));
</span></span></pre></div>
<a id="trunkSourceThirdPartyANGLEincludeGLES2gl2h"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/ANGLE/include/GLES2/gl2.h (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/ANGLE/include/GLES2/gl2.h        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/ThirdParty/ANGLE/include/GLES2/gl2.h        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -470,8 +470,7 @@
</span><span class="cx">  * GL core functions.
</span><span class="cx">  *-----------------------------------------------------------------------*/
</span><span class="cx"> 
</span><del>-// FIXME: Get WebGL working on Windows with CMake. https://bugs.webkit.org/show_bug.cgi?id=143311
-#if defined(_MSC_VER) &amp;&amp; !defined(ANGLE_WEBKIT_WIN) &amp;&amp; !defined(BUILDING_WITH_CMAKE)
</del><ins>+#if defined(_MSC_VER) &amp;&amp; !defined(ANGLE_WEBKIT_WIN)
</ins><span class="cx"> #include &lt;GLES2/gl2softlinking.h&gt;
</span><span class="cx"> #else
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/WebCore/ChangeLog        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-08-04  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Soft link libGLESv2 and libEGL on Windows again
+        https://bugs.webkit.org/show_bug.cgi?id=147671
+
+        Reviewed by Dean Jackson.
+
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::initializeEGLDisplay):
+        Fail gracefully if libEGL is not found.
+
</ins><span class="cx"> 2015-08-04  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove another unused database function
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPlatformDisplaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (187927 => 187928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp        2015-08-05 01:08:30 UTC (rev 187927)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp        2015-08-05 01:15:22 UTC (rev 187928)
</span><span class="lines">@@ -129,6 +129,12 @@
</span><span class="cx">     m_eglDisplayInitialized = true;
</span><span class="cx"> 
</span><span class="cx">     if (m_eglDisplay == EGL_NO_DISPLAY) {
</span><ins>+// EGL is optionally soft linked on Windows.
+#if PLATFORM(WIN)
+        auto eglGetDisplay = eglGetDisplayPtr();
+        if (!eglGetDisplay)
+            return;
+#endif
</ins><span class="cx">         m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
</span><span class="cx">         if (m_eglDisplay == EGL_NO_DISPLAY)
</span><span class="cx">             return;
</span></span></pre>
</div>
</div>

</body>
</html>