Bug 1145585 - Hold a ref to the right texture. r=jmuizelaar, a=lmandel
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 25 Mar 2015 09:37:20 +1300
changeset 252106 e35deaa85d21
parent 252105 d56b6d648c01
child 252107 8fda35675a3f
push id701
push userryanvm@gmail.com
push date2015-03-25 00:23 +0000
treeherdermozilla-release@7ec23d08cf32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar, lmandel
bugs1145585
milestone37.0
Bug 1145585 - Hold a ref to the right texture. r=jmuizelaar, a=lmandel
gfx/layers/d3d11/TextureD3D11.cpp
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -174,19 +174,19 @@ TextureClientD3D11::TextureClientD3D11(I
   , mNeedsClear(false)
   , mNeedsClearWhite(false)
 {}
 
 TextureClientD3D11::~TextureClientD3D11()
 {
   if (mActor) {
     if (mTexture) {
-      KeepUntilFullDeallocation(MakeUnique<TKeepAlive<ID3D10Texture2D>>(mTexture10));
+      KeepUntilFullDeallocation(MakeUnique<TKeepAlive<ID3D11Texture2D>>(mTexture));
     } else if (mTexture10) {
-      KeepUntilFullDeallocation(MakeUnique<TKeepAlive<ID3D11Texture2D>>(mTexture));
+      KeepUntilFullDeallocation(MakeUnique<TKeepAlive<ID3D10Texture2D>>(mTexture10));
     }
   }
 #ifdef DEBUG
   // An Azure DrawTarget needs to be locked when it gets nullptr'ed as this is
   // when it calls EndDraw. This EndDraw should not execute anything so it
   // shouldn't -really- need the lock but the debug layer chokes on this.
   if (mDrawTarget) {
     MOZ_ASSERT(!mIsLocked);