Bug 1089364. Avoid trying to resize the swap chain to a negative size. r=bas
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 13 Nov 2014 10:10:48 -0500
changeset 215631 a9034a65b5291f6dc7b31be626d7a6a84bb19a45
parent 215630 451e1d755d89b0c4b678f35ac85a782fccf6752c
child 215632 a03d97422b73ea3f90071bcc7b6ebd99c1df6002
push id51801
push userjmuizelaar@mozilla.com
push dateThu, 13 Nov 2014 21:32:27 +0000
treeherdermozilla-inbound@a9034a65b529 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1089364
milestone36.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 1089364. Avoid trying to resize the swap chain to a negative size. r=bas 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
@@ -930,17 +930,17 @@ CompositorD3D11::VerifyBufferSize()
 
   hr = mSwapChain->GetDesc(&swapDesc);
   if (Failed(hr)) {
     return;
   }
 
   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()) {
     hr = mSwapChain->ResizeBuffers(2, mSize.width, mSize.height,
                                    DXGI_FORMAT_B8G8R8A8_UNORM,