Bug 1117594 - Crash on unexpected image format in ImageLayerD3D10::RenderLayer(). r=bas.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 05 Jan 2015 15:53:22 -0800
changeset 248017 03a624fda816a88542009914969af4ab6a358e4c
parent 248016 eb0d05a27922366d578bbf274c48c0215045bf4d
child 248018 757184e87736e7e6f80a2c50d58df05b6fcc9877
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1117594
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 1117594 - Crash on unexpected image format in ImageLayerD3D10::RenderLayer(). r=bas.
gfx/layers/d3d10/ImageLayerD3D10.cpp
--- a/gfx/layers/d3d10/ImageLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp
@@ -299,16 +299,18 @@ ImageLayerD3D10::RenderLayer()
 
     effect()->GetVariableByName("vTextureCoords")->AsVector()->SetFloatVector(
       ShaderConstantRectD3D10(
         (float)yuvImage->GetData()->mPicX / yuvImage->GetData()->mYSize.width,
         (float)yuvImage->GetData()->mPicY / yuvImage->GetData()->mYSize.height,
         (float)yuvImage->GetData()->mPicSize.width / yuvImage->GetData()->mYSize.width,
         (float)yuvImage->GetData()->mPicSize.height / yuvImage->GetData()->mYSize.height)
        );
+  } else {
+    MOZ_CRASH("unexpected image format");
   }
 
   bool resetTexCoords = image->GetFormat() == ImageFormat::PLANAR_YCBCR;
   image = nullptr;
   autoLock.Unlock();
 
   technique->GetPassByIndex(0)->Apply(0);
   device()->Draw(4, 0);