Bug 1659826 - Lock the d3d texture data during destruction. r=sotaro

Differential Revision: https://phabricator.services.mozilla.com/D89623
This commit is contained in:
Nicolas Silva 2020-10-07 10:09:42 +00:00
parent cb8855101f
commit b3b34e26b3

View File

@ -276,13 +276,9 @@ static void DestroyDrawTarget(RefPtr<DrawTarget>& aDT,
// 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.
#ifdef DEBUG
LockD3DTexture(aTexture.get());
#endif
aDT = nullptr;
#ifdef DEBUG
UnlockD3DTexture(aTexture.get());
#endif
aTexture = nullptr;
}