Bug 992874 - Don't try to texture from bad D3D10 texture. - r=bas
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 16 Apr 2014 11:05:48 -0700
changeset 197331 1e163918ea051d3a94623f69da155071494713c2
parent 197330 746ce8a34f0f677e9ffc93fb7cc914c4a189a1d5
child 197332 b394e883b80644b49c5636b92cff1f41a9f00d28
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs992874
milestone31.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 992874 - Don't try to texture from bad D3D10 texture. - r=bas
gfx/layers/d3d10/CanvasLayerD3D10.cpp
--- a/gfx/layers/d3d10/CanvasLayerD3D10.cpp
+++ b/gfx/layers/d3d10/CanvasLayerD3D10.cpp
@@ -112,20 +112,25 @@ CanvasLayerD3D10::UpdateSurface()
   Painted();
 
   if (mDrawTarget) {
     mDrawTarget->Flush();
   } else if (mIsD2DTexture) {
     return;
   }
 
+  if (!mTexture) {
+    return;
+  }
+
   if (mGLContext) {
     SharedSurface_GL* surf = mGLContext->RequestFrame();
-    if (!surf)
-        return;
+    if (!surf) {
+      return;
+    }
 
     switch (surf->Type()) {
       case SharedSurfaceType::EGLSurfaceANGLE: {
         SharedSurface_ANGLEShareHandle* shareSurf = SharedSurface_ANGLEShareHandle::Cast(surf);
 
         mSRView = shareSurf->GetSRV();
         return;
       }