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 217951 280407351f1b82031d71b5804c88043237af953f
parent 217950 fb8ff9258d029d869d5e707c385799abdf09438e
child 217952 2431af782661ba40a72507652ecbc07e915f9069
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [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;