Bug 1107718 - Addendum: Properly address review comments. r=nical
authorBas Schouten <bschouten@mozilla.com>
Thu, 08 Jan 2015 00:12:29 +0000
changeset 222549 3ca05c4232abd5690a6a7637ae55454a949ce3b4
parent 222548 6c673d6a2fb839be5d769660fa17eb243e2ff2b2
child 222550 689797cc26c4d6a947b3e5e6526a62734b5e9372
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1107718
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;