From 25767b735dc208879f61547797a6af93233cc3a9 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Tue, 14 Jul 2015 17:02:21 +0000 Subject: [PATCH] Bug 1159751: Ensure WARP can never be used for Windows 7. r=milan --- gfx/thebes/gfxWindowsPlatform.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 581d3eb893f7..de530d8bf958 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1883,6 +1883,11 @@ gfxWindowsPlatform::InitD3D11Devices() } bool useWARP = false; + bool allowWARP = false; + + if (IsWin8OrLater()) { + allowWARP = true; + } nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); if (gfxInfo) { @@ -1906,7 +1911,7 @@ gfxWindowsPlatform::InitD3D11Devices() } } - useWARP = true; + useWARP = allowWARP; } } } @@ -1942,7 +1947,7 @@ gfxWindowsPlatform::InitD3D11Devices() if (!gfxPrefs::LayersD3D11DisableWARP()) { return; } - useWARP = true; + useWARP = allowWARP; } } @@ -1964,7 +1969,7 @@ gfxWindowsPlatform::InitD3D11Devices() return; } - useWARP = true; + useWARP = allowWARP; adapter = nullptr; } @@ -1974,7 +1979,7 @@ gfxWindowsPlatform::InitD3D11Devices() return; } - useWARP = true; + useWARP = allowWARP; adapter = nullptr; }