Merge r2002 to dx11proto: Remove dependency on dwmapi.dll.

parent 807faf22
...@@ -401,11 +401,7 @@ ...@@ -401,11 +401,7 @@
'VCLinkerTool': { 'VCLinkerTool': {
'AdditionalDependencies': [ 'AdditionalDependencies': [
'd3d9.lib', 'd3d9.lib',
'dwmapi.lib',
], ],
'DelayLoadDLLs': [
'dwmapi.dll',
]
} }
}, },
}, },
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include "libEGL/main.h" #include "libEGL/main.h"
#include "libEGL/Display.h" #include "libEGL/Display.h"
#include <dwmapi.h>
namespace egl namespace egl
{ {
...@@ -74,24 +72,6 @@ bool Surface::initialize() ...@@ -74,24 +72,6 @@ bool Surface::initialize()
if (!resetSwapChain()) if (!resetSwapChain())
return false; return false;
// Modify present parameters for this window, if we are composited,
// 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);
}
}
return true; return true;
} }
......
...@@ -73,9 +73,10 @@ ...@@ -73,9 +73,10 @@
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath> <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath> <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath> <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath> <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
...@@ -93,9 +94,9 @@ ...@@ -93,9 +94,9 @@
<DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>d3d9.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
<DelayLoadDLLs>dwmapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<DataExecutionPrevention> <DataExecutionPrevention>
...@@ -126,9 +127,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -126,9 +127,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>d3d9.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
<DelayLoadDLLs>dwmapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
...@@ -165,9 +166,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -165,9 +166,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>d3d9.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
<DelayLoadDLLs>dwmapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<DataExecutionPrevention> <DataExecutionPrevention>
...@@ -201,9 +202,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -201,9 +202,9 @@ copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>d3d9.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
<DelayLoadDLLs>dwmapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment