зеркало из https://github.com/mozilla/gecko-dev.git
Bug 967505 - Fix a crash with the D2D debug layer. r=Bas
This commit is contained in:
Родитель
29cb706c84
Коммит
9e9d5be4ae
|
@ -150,7 +150,21 @@ TextureClientD3D11::TextureClientD3D11(gfx::SurfaceFormat aFormat, TextureFlags
|
|||
{}
|
||||
|
||||
TextureClientD3D11::~TextureClientD3D11()
|
||||
{}
|
||||
{
|
||||
#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);
|
||||
MOZ_ASSERT(mTexture);
|
||||
MOZ_ASSERT(mDrawTarget->refcount() == 1);
|
||||
LockD3DTexture(mTexture.get());
|
||||
mDrawTarget = nullptr;
|
||||
UnlockD3DTexture(mTexture.get());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
TextureClientD3D11::Lock(OpenMode aMode)
|
||||
|
|
Загрузка…
Ссылка в новой задаче