Bug 1030147 - Release the DrawTarget to drop the surface ref in ThebesLayerD3D9. r=Bas a=lmandel CLOSED TREE
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 23 Sep 2014 16:14:26 -0400
changeset 216829 280407351f1b
parent 216828 fb8ff9258d02
child 216830 2431af782661
push id3933
push usermwoodrow@mozilla.com
push date2014-09-23 20:15 +0000
treeherdermozilla-beta@280407351f1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, lmandel
bugs1030147
milestone33.0
Bug 1030147 - Release the DrawTarget to drop the surface ref in ThebesLayerD3D9. r=Bas a=lmandel CLOSED TREE
gfx/layers/d3d9/ThebesLayerD3D9.cpp
--- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp
@@ -552,16 +552,17 @@ ThebesLayerD3D9::DrawRegion(nsIntRegion 
       ctx->SetSource(destinationSurface, gfxPoint(bounds.x, bounds.y));
       ctx->Paint();
       update.mLayer->GetSink()->EndUpdate(ctx, update.mUpdateRect + offset);
     }
   }
 
   // Release the cairo d3d9 surface before we try to composite it
   context = nullptr;
+  dt = nullptr;
 
   nsAutoTArray<IDirect3DTexture9*,2> srcTextures;
   nsAutoTArray<IDirect3DTexture9*,2> destTextures;
   switch (aMode)
   {
     case SurfaceMode::SURFACE_OPAQUE:
       // Must release reference to dest surface before ending drawing
       destinationSurface = nullptr;