Bug 1089364 - Avoid trying to resize the swap chain to a negative size. r=bas, a=lmandel
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 13 Nov 2014 10:10:48 -0500
changeset 233943 59bdd524ada8a65fbfea364ac73e648e7cb92091
parent 233942 1a3f9aae6df7bb5c86b4f3e473c446afcd7339f0
child 233944 6181e6dc51b07e860e37f4b10431ea2645bc90b7
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas, lmandel
bugs1089364
milestone35.0a2
Bug 1089364 - Avoid trying to resize the swap chain to a negative size. r=bas, a=lmandel This was causing GetBuffer to return DXGI_ERROR_INVALID_CALL
gfx/layers/d3d11/CompositorD3D11.cpp
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -871,17 +871,17 @@ CompositorD3D11::EnsureSize()
 void
 CompositorD3D11::VerifyBufferSize()
 {
   DXGI_SWAP_CHAIN_DESC swapDesc;
   mSwapChain->GetDesc(&swapDesc);
 
   if ((swapDesc.BufferDesc.Width == mSize.width &&
        swapDesc.BufferDesc.Height == mSize.height) ||
-      mSize.width == 0 || mSize.height == 0) {
+      mSize.width <= 0 || mSize.height <= 0) {
     return;
   }
 
   mDefaultRT = nullptr;
 
   if (IsRunningInWindowsMetro()) {
     mSwapChain->ResizeBuffers(2, mSize.width, mSize.height,
                               DXGI_FORMAT_B8G8R8A8_UNORM,