summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libEGL/Surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libEGL/Surface.cpp')
-rw-r--r--src/3rdparty/angle/src/libEGL/Surface.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp
index a430a3530f..b47a7bcc20 100644
--- a/src/3rdparty/angle/src/libEGL/Surface.cpp
+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp
@@ -20,8 +20,6 @@
#include "libEGL/main.h"
#include "libEGL/Display.h"
-#include <dwmapi.h>
-
namespace egl
{
@@ -71,44 +69,9 @@ Surface::~Surface()
bool Surface::initialize()
{
- typedef HRESULT (STDAPICALLTYPE *PtrDwmIsCompositionEnabled)(BOOL*);
- typedef HRESULT (STDAPICALLTYPE *PtrDwmSetPresentParameters)(HWND, DWM_PRESENT_PARAMETERS *);
-
if (!resetSwapChain())
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)) {
- // 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);
- }
- }
- }
-
return true;
}