Bug 624109: Deal with failing DXGI factory creation due to DLL injections. r=joedrew
authorBas Schouten <bschouten@mozilla.com>
Tue, 31 Jan 2012 06:15:23 +0100
changeset 87030 c654ab313a6d00b408344e68ed494ece98bfc9f8
parent 87029 713814f071689ff0852bbb61b6128a875edc1c94
child 87031 c645bbfc747563fa469d07d78d39a97ef6a7b92c
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs624109
milestone12.0a1
Bug 624109: Deal with failing DXGI factory creation due to DLL injections. r=joedrew
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -337,16 +337,22 @@ gfxWindowsPlatform::VerifyD2DDevice(bool
 
         // Try to use a DXGI 1.1 adapter in order to share resources
         // across processes.
         nsRefPtr<IDXGIAdapter1> adapter1;
         if (createDXGIFactory1) {
             nsRefPtr<IDXGIFactory1> factory1;
             HRESULT hr = createDXGIFactory1(__uuidof(IDXGIFactory1),
                                             getter_AddRefs(factory1));
+
+            if (FAILED(hr) || !factory1) {
+              // This seems to happen with some people running the iZ3D driver.
+              // They won't get acceleration.
+              return;
+            }
     
             nsRefPtr<IDXGIAdapter1> adapter1; 
             hr = factory1->EnumAdapters1(0, getter_AddRefs(adapter1));
 
             if (SUCCEEDED(hr) && adapter1) {
                 hr = adapter1->CheckInterfaceSupport(__uuidof(ID3D10Device1),
                                                      nsnull);
                 if (FAILED(hr)) {