summaryrefslogtreecommitdiffstats
path: root/gfx/thebes
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/thebes')
-rwxr-xr-xgfx/thebes/gfxWindowsPlatform.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
index 82e36efe2..4a94a751b 100755
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -39,8 +39,6 @@
#include "DeviceManagerD3D9.h"
#include "mozilla/layers/ReadbackManagerD3D11.h"
-#include "WinUtils.h"
-
#include "gfxDWriteFontList.h"
#include "gfxDWriteFonts.h"
#include "gfxDWriteCommon.h"
@@ -59,6 +57,7 @@
#include "nsMemory.h"
+#include <dwmapi.h>
#include <d3d11.h>
#include "nsIMemoryReporter.h"
@@ -1633,10 +1632,9 @@ gfxWindowsPlatform::InitGPUProcessSupport()
bool
gfxWindowsPlatform::DwmCompositionEnabled()
{
- MOZ_ASSERT(WinUtils::dwmIsCompositionEnabledPtr);
BOOL dwmEnabled = false;
- if (FAILED(WinUtils::dwmIsCompositionEnabledPtr(&dwmEnabled))) {
+ if (FAILED(DwmIsCompositionEnabled(&dwmEnabled))) {
return false;
}
@@ -1671,7 +1669,7 @@ public:
DWM_TIMING_INFO vblankTime;
// Make sure to init the cbSize, otherwise GetCompositionTiming will fail
vblankTime.cbSize = sizeof(DWM_TIMING_INFO);
- HRESULT hr = WinUtils::dwmGetCompositionTimingInfoPtr(0, &vblankTime);
+ HRESULT hr = DwmGetCompositionTimingInfo(0, &vblankTime);
if (SUCCEEDED(hr)) {
UNSIGNED_RATIO refreshRate = vblankTime.rateRefresh;
// We get the rate in hertz / time, but we want the rate in ms.
@@ -1756,7 +1754,7 @@ public:
// Make sure to init the cbSize, otherwise
// GetCompositionTiming will fail
vblankTime.cbSize = sizeof(DWM_TIMING_INFO);
- HRESULT hr = WinUtils::dwmGetCompositionTimingInfoPtr(0, &vblankTime);
+ HRESULT hr = DwmGetCompositionTimingInfo(0, &vblankTime);
if (!SUCCEEDED(hr)) {
return vsync;
}
@@ -1838,7 +1836,7 @@ public:
// Using WaitForVBlank, the whole system dies because WaitForVBlank
// only works if it's run on the same thread as the Present();
- HRESULT hr = WinUtils::dwmFlushProcPtr();
+ HRESULT hr = DwmFlush();
if (!SUCCEEDED(hr)) {
// DWMFlush isn't working, fallback to software vsync.
ScheduleSoftwareVsync(TimeStamp::Now());
@@ -1918,13 +1916,9 @@ already_AddRefed<mozilla::gfx::VsyncSource>
gfxWindowsPlatform::CreateHardwareVsyncSource()
{
MOZ_RELEASE_ASSERT(NS_IsMainThread(), "GFX: Not in main thread.");
- if (!WinUtils::dwmIsCompositionEnabledPtr) {
- NS_WARNING("Dwm composition not available, falling back to software vsync");
- return gfxPlatform::CreateHardwareVsyncSource();
- }
BOOL dwmEnabled = false;
- WinUtils::dwmIsCompositionEnabledPtr(&dwmEnabled);
+ DwmIsCompositionEnabled(&dwmEnabled);
if (!dwmEnabled) {
NS_WARNING("DWM not enabled, falling back to software vsync");
return gfxPlatform::CreateHardwareVsyncSource();