Bug 870724 - Check for a specific D3D type rather than the sdk version when defining D3D11 types in gfxWindowsPlatform.h. r=khuey
authorJim Mathies <jmathies@mozilla.com>
Fri, 10 May 2013 08:26:10 -0500
changeset 131505 25c04296c67543149fefa4d447c5a689ec8099b6
parent 131504 a5fd9bdc9bd826c5985a6282d8c7e4266ac584f4
child 131506 6d2e81a6bf1b17455d76476f5779a04d84d2eb8d
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs870724
milestone23.0a1
Bug 870724 - Check for a specific D3D type rather than the sdk version when defining D3D11 types in gfxWindowsPlatform.h. r=khuey
gfx/thebes/gfxWindowsPlatform.h
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -29,18 +29,20 @@
 
 #include <windows.h>
 #include <objbase.h>
 
 #ifdef CAIRO_HAS_D2D_SURFACE
 #include <dxgi.h>
 #endif
 
+// This header is available in the June 2010 SDK and in the Win8 SDK
+#include <d3dcommon.h>
 // Win 8.0 SDK types we'll need when building using older sdks.
-#if MOZ_WINSDK_TARGETVER <= 0x06010000
+#if !defined(D3D_FEATURE_LEVEL_11_1) // defined in the 8.0 SDK only
 #define D3D_FEATURE_LEVEL_11_1 static_cast<D3D_FEATURE_LEVEL>(0xb100)
 #define D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION 2048
 #define D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION 4096
 #endif
 
 class ID3D11Device;
 class IDXGIAdapter1;