Bug 770694 - Fix for snapped view windows size. r=bas
authorBrian R. Bondy <netzen@gmail.com>
Wed, 04 Jul 2012 20:36:37 -0400
changeset 100578 1cfacf0e86b4aa1d8dcf556e177a468e4f13df61
parent 100577 959f9da9f85e5a32012c6ff6b25be2a2ddfe4668
child 100579 92f34cddc5a6e34091ae9d077868b9b7394fcd44
push id23185
push usermbrubeck@mozilla.com
push dateThu, 26 Jul 2012 20:58:28 +0000
treeherdermozilla-central@8a7ad0adcccf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs770694
milestone17.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 770694 - Fix for snapped view windows size. r=bas
gfx/layers/d3d10/LayerManagerD3D10.cpp
--- a/gfx/layers/d3d10/LayerManagerD3D10.cpp
+++ b/gfx/layers/d3d10/LayerManagerD3D10.cpp
@@ -626,21 +626,24 @@ LayerManagerD3D10::VerifyBufferSize()
     mSwapChain->GetDesc(&swapDesc);
 
     if (swapDesc.BufferDesc.Width == rect.width &&
         swapDesc.BufferDesc.Height == rect.height) {
       return;
     }
 
     mRTView = nsnull;
-    if (gfxWindowsPlatform::IsOptimus() ||
-        gfxWindowsPlatform::IsRunningInWindows8Metro()) {
+    if (gfxWindowsPlatform::IsOptimus()) { 
       mSwapChain->ResizeBuffers(1, rect.width, rect.height,
                                 DXGI_FORMAT_B8G8R8A8_UNORM,
                                 0);
+    } else if (gfxWindowsPlatform::IsRunningInWindows8Metro()) {
+      mSwapChain->ResizeBuffers(2, rect.width, rect.height,
+                                DXGI_FORMAT_B8G8R8A8_UNORM,
+                                0);
     } else {
       mSwapChain->ResizeBuffers(1, rect.width, rect.height,
                                 DXGI_FORMAT_B8G8R8A8_UNORM,
                                 DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE);
     }
   } else {
     D3D10_TEXTURE2D_DESC oldDesc;    
     if (mBackBuffer) {