Bug 1107718 - Addendum: Properly address review comments. r=nical
authorBas Schouten <bschouten@mozilla.com>
Thu, 08 Jan 2015 00:12:29 +0000
changeset 235573 3ca05c4232abd5690a6a7637ae55454a949ce3b4
parent 235572 6c673d6a2fb839be5d769660fa17eb243e2ff2b2
child 235574 689797cc26c4d6a947b3e5e6526a62734b5e9372
push id366
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:40:24 +0000
reviewersnical
bugs1107718
milestone37.0a1
Bug 1107718 - Addendum: Properly address review comments. r=nical
gfx/layers/d3d11/CompositorD3D11.cpp
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -1206,30 +1206,24 @@ CompositorD3D11::VerifyBufferSize()
     MOZ_ASSERT(mDefaultRT->hasOneRef());
     mDefaultRT = nullptr;
   }
 
   if (IsRunningInWindowsMetro()) {
     hr = mSwapChain->ResizeBuffers(2, mSize.width, mSize.height,
                                    DXGI_FORMAT_B8G8R8A8_UNORM,
                                    0);
-    HandleError(hr);
     mDisableSequenceForNextFrame = true;
   } else {
     hr = mSwapChain->ResizeBuffers(1, mSize.width, mSize.height,
                                    DXGI_FORMAT_B8G8R8A8_UNORM,
                                    0);
-    HandleError(hr);
   }
 
-  if (FAILED(hr)) {
-    return false;
-  }
-
-  return true;
+  return Succeeded(hr);
 }
 
 void
 CompositorD3D11::UpdateRenderTarget()
 {
   EnsureSize();
   VerifyBufferSize();
 
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -384,16 +384,17 @@ gfxWindowsPlatform::UpdateRenderMode()
 {
 /* Pick the default render mode for
  * desktop.
  */
     if (DidRenderingDeviceReset()) {
       mD3D11DeviceInitialized = false;
       mD3D11Device = nullptr;
       mD3D11ContentDevice = nullptr;
+      mAdapter = nullptr;
 
       imgLoader::Singleton()->ClearCache(true);
       imgLoader::Singleton()->ClearCache(false);
       Factory::SetDirect3D11Device(nullptr);
     }
 
     mRenderMode = RENDER_GDI;