From cfc0c711391a4c0d066c018c8675b512d6d51cb8 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: May 17 2013 16:57:48 +0000 Subject: Update to 20130517 snapshot (r2215) --- diff --git a/.gitignore b/.gitignore index 886010d..c9c74cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /angleproject-r1561.tar.bz2 +/angleproject-r2215.tar.bz2 diff --git a/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch b/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch deleted file mode 100644 index f58cfe2..0000000 --- a/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch +++ /dev/null @@ -1,75 +0,0 @@ -From a5ed22f7c9aa51eebbd3ec48904a4c0999dcced6 Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint -Date: Tue, 6 Nov 2012 09:22:18 +0100 -Subject: [PATCH] Dynamically resolve functions of dwmapi.dll. - -The library is not present on Windows XP, for which /DELAYLOAD -is used in ANGLE. However, as this causes problems with MinGW, -use dynamic resolution. - -Task-number: QTBUG-27741 -Change-Id: I16214d6f98a184d89858c50ee5306371ea25469e ---- - src/3rdparty/angle/src/libEGL/Surface.cpp | 39 +++++++++++++++++++++-------- - 1 file changed, 28 insertions(+), 11 deletions(-) - -diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp -index 732c404..34df14c 100644 ---- a/src/3rdparty/angle/src/libEGL/Surface.cpp -+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp -@@ -73,6 +73,9 @@ Surface::~Surface() - - bool Surface::initialize() - { -+ typedef HRESULT (STDAPICALLTYPE *PtrDwmIsCompositionEnabled)(BOOL*); -+ typedef HRESULT (STDAPICALLTYPE *PtrDwmSetPresentParameters)(HWND, DWM_PRESENT_PARAMETERS *); -+ - ASSERT(!mSwapChain && !mOffscreenTexture && !mDepthStencil); - - if (!resetSwapChain()) -@@ -82,17 +85,31 @@ bool Surface::initialize() - // to minimize the amount of queuing done by DWM between our calls to - // present and the actual screen. - if (mWindow && (getComparableOSVersion() >= versionWindowsVista)) { -- BOOL isComposited; -- HRESULT result = DwmIsCompositionEnabled(&isComposited); -- if (SUCCEEDED(result) && isComposited) { -- DWM_PRESENT_PARAMETERS presentParams; -- memset(&presentParams, 0, sizeof(presentParams)); -- presentParams.cbSize = sizeof(DWM_PRESENT_PARAMETERS); -- presentParams.cBuffer = 2; -- -- result = DwmSetPresentParameters(mWindow, &presentParams); -- if (FAILED(result)) -- ERR("Unable to set present parameters: 0x%08X", result); -+ // Resolve dwmapi.dll functions dynamically as the Library is -+ // not present on Windows XP. Alternatively, /DELAYLOAD could be used. -+ static PtrDwmIsCompositionEnabled dwmIsCompositionEnabled = 0; -+ static PtrDwmSetPresentParameters dwmSetPresentParameters = 0; -+ if (!dwmIsCompositionEnabled) { -+ if (const HMODULE dwmLibrary = LoadLibraryW(L"dwmapi.dll")) { -+ dwmIsCompositionEnabled = -+ (PtrDwmIsCompositionEnabled)GetProcAddress(dwmLibrary, "DwmIsCompositionEnabled"); -+ dwmSetPresentParameters = -+ (PtrDwmSetPresentParameters)GetProcAddress(dwmLibrary, "DwmSetPresentParameters"); -+ } -+ } -+ if (dwmIsCompositionEnabled && dwmSetPresentParameters) { -+ BOOL isComposited; -+ HRESULT result = dwmIsCompositionEnabled(&isComposited); -+ if (SUCCEEDED(result) && isComposited) { -+ DWM_PRESENT_PARAMETERS presentParams; -+ memset(&presentParams, 0, sizeof(presentParams)); -+ presentParams.cbSize = sizeof(DWM_PRESENT_PARAMETERS); -+ presentParams.cBuffer = 2; -+ -+ result = dwmSetPresentParameters(mWindow, &presentParams); -+ if (FAILED(result)) -+ ERR("Unable to set present parameters: 0x%08X", result); -+ } - } - } - --- -1.7.10.msysgit.1 - diff --git a/angleproject-fix-case-sensitive-include.patch b/angleproject-fix-case-sensitive-include.patch index 787e436..8fc6faf 100644 --- a/angleproject-fix-case-sensitive-include.patch +++ b/angleproject-fix-case-sensitive-include.patch @@ -2,12 +2,23 @@ Index: src/libEGL/Display.h =================================================================== --- src/libEGL/Display.h (revision 1561) +++ src/libEGL/Display.h (working copy) -@@ -16,7 +16,7 @@ - #endif - #include +@@ -13,7 +13,7 @@ + + #include "common/system.h" #include -#include +#include #include #include +--- src/common/system.h.orig 2013-05-17 18:49:48.947324255 +0200 ++++ src/common/system.h 2013-05-17 18:49:56.597454331 +0200 +@@ -15,7 +15,7 @@ + + #include + #include +-#include ++#include + #include + #include + diff --git a/mingw-angleproject.spec b/mingw-angleproject.spec index 89f0388..5120d8b 100644 --- a/mingw-angleproject.spec +++ b/mingw-angleproject.spec @@ -1,12 +1,12 @@ %?mingw_package_header -%global svn_revision 1561 -%global svn_stamp 20121214 +%global svn_revision 2215 +%global svn_stamp 20130517 Summary: Almost Native Graphics Layer Engine Name: mingw-angleproject Version: 0 -Release: 0.4.svn%{svn_revision}.%{svn_stamp}%{?dist} +Release: 0.5.svn%{svn_revision}.%{svn_stamp}%{?dist} License: BSD Group: System Environment/Libraries URL: http://code.google.com/p/angleproject/ @@ -29,11 +29,6 @@ BuildArch: noarch # File names are case-sensitive on Linux Patch0: angleproject-fix-case-sensitive-include.patch -# Avoid having a hard dependency on dwmapi.dll as that library only -# became available starting with Windows Vista. -# Patch taken from the Qt project: https://bugreports.qt-project.org/browse/QTBUG-27741 -Patch1: 0001-Dynamically-resolve-functions-of-dwmapi.dll.patch - # Make sure an import library is created and the correct .def file is used during the build Patch2: angleproject-include-import-library-and-use-def-file.patch @@ -143,7 +138,6 @@ Static version of the mingw64-angleproject library. %prep %setup -q -n angleproject %patch0 -p0 -%patch1 -p4 %patch2 -p0 %patch3 -p0 %patch4 -p4 @@ -254,6 +248,9 @@ cp -Rv include/* $RPM_BUILD_ROOT%{mingw64_includedir} %changelog +* Fri May 17 2013 Erik van Pienbroek - 0-0.5.svn2215.20130517 +- Update to 20130517 snapshot (r2215) + * Thu Apr 4 2013 Erik van Pienbroek - 0-0.4.svn1561.20121214 - Added another workaround due to the fact that the gyp build system doesn't properly support cross-compilation diff --git a/sources b/sources index f582b07..87ed0de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fef71559522e810eb38863e5b7d55d20 angleproject-r1561.tar.bz2 +ed7c61ccf10d14b2dad3d466b799f991 angleproject-r2215.tar.bz2