Bug 744063 - Pass Y' texture size rather than picture size to Nv3DV. r=bas a=akeybl
authorMatthew Gregan <kinetik@flim.org>
Fri, 25 May 2012 12:10:49 +1200
changeset 95868 f937f9e12e9bf6303c874aaa84586d43335c65c1
parent 95867 2056622a1ac05b0e98f5e3084cbacc70f7841771
child 95869 6db75fba7c00980d93684a9b658e8fcc898c71c8
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas, akeybl
bugs744063
milestone14.0a2
Bug 744063 - Pass Y' texture size rather than picture size to Nv3DV. r=bas a=akeybl
gfx/layers/d3d10/ImageLayerD3D10.cpp
gfx/layers/d3d9/Nv3DVUtils.cpp
--- a/gfx/layers/d3d10/ImageLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp
@@ -271,18 +271,18 @@ ImageLayerD3D10::RenderLayer()
         break;
       }
       
       // Send control data even in mono case so driver knows to leave stereo mode.
       GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE);
 
       if (yuvImage->mData.mStereoMode != STEREO_MODE_MONO) {
         // Dst resource is optional
-        GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)yuvImage->mSize.width, 
-                                           (unsigned int)yuvImage->mSize.height, (HANDLE)(data->mYTexture), (HANDLE)(NULL));
+        GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)yuvImage->mData.mYSize.width, 
+                                           (unsigned int)yuvImage->mData.mYSize.height, (HANDLE)(data->mYTexture), (HANDLE)(NULL));
       }
     }
 
     effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector(
       ShaderConstantRectD3D10(
         (float)0,
         (float)0,
         (float)size.width,
--- a/gfx/layers/d3d9/Nv3DVUtils.cpp
+++ b/gfx/layers/d3d9/Nv3DVUtils.cpp
@@ -121,49 +121,48 @@ Nv3DVUtils::SetDeviceInfo(IUnknown *devU
     NS_WARNING("D3D Device Pointer (IUnknown) is NULL.\n");
     return;
   }
 
   if (!m3DVStreaming) {
       return;
   }
 
-  bool rv = false;
-  rv = m3DVStreaming->Nv3DVSetDevice(devUnknown);
-  if (rv) {
+  bool rv = m3DVStreaming->Nv3DVSetDevice(devUnknown);
+  if (!rv) {
       NS_WARNING("Nv3DVStreaming Nv3DVControl failed!");
       return;
   }
 
   rv = m3DVStreaming->Nv3DVControl(NV_STEREO_MODE_RIGHT_LEFT, true, FIREFOX_3DV_APP_HANDLE);
-  NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVControl failed!");
+  NS_WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!");
 }
 
 /*
  * Send Stereo Control Information. Used mainly to re-route 
  * calls from ImageLayerD3D9 to the 3DV COM object
  */
 void 
 Nv3DVUtils::SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle)
 {
   if (!m3DVStreaming)
       return;
 
   DebugOnly<bool> rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle);
-  NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVControl failed!");
+  NS_WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!");
 }
 
 /*
  * Send Stereo Metadata. Used mainly to re-route calls 
  * from ImageLayerD3D9 to the 3DV COM object
  */
 void 
 Nv3DVUtils::SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst)
 {
   if (!m3DVStreaming)
       return;
 
   DebugOnly<bool> rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst);
-  NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVMetaData failed!");
+  NS_WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVMetaData failed!");
 }
 
 } /* namespace layers */
 } /* namespace mozilla */