From fbb1c0bfe768e9233ba57cd9ea9c997e7c115fdb Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 27 Oct 2015 11:58:05 +0100 Subject: [PATCH] Bug 1211204 - Remove possible false-negative with D3D9 texture memory reporting. r=mattwoodrow --- gfx/layers/d3d9/TextureD3D9.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/layers/d3d9/TextureD3D9.cpp b/gfx/layers/d3d9/TextureD3D9.cpp index ccc5690f064b..e2c865e1760f 100644 --- a/gfx/layers/d3d9/TextureD3D9.cpp +++ b/gfx/layers/d3d9/TextureD3D9.cpp @@ -670,6 +670,9 @@ SharedTextureClientD3D9::SharedTextureClientD3D9(ISurfaceAllocator* aAllocator, SharedTextureClientD3D9::~SharedTextureClientD3D9() { MOZ_COUNT_DTOR(SharedTextureClientD3D9); + if (mTexture) { + gfxWindowsPlatform::sD3D9SharedTextureUsed -= mDesc.Width * mDesc.Height * 4; + } } void @@ -678,9 +681,6 @@ SharedTextureClientD3D9::FinalizeOnIPDLThread() if (mTexture && mActor) { KeepUntilFullDeallocation(MakeUnique>(mTexture)); } - if (mTexture) { - gfxWindowsPlatform::sD3D9SharedTextureUsed -= mDesc.Width * mDesc.Height * 4; - } } // static