mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1293772 - Check that the TextureClient is not internally shut down in Lock, Unlock and BorrowDrawTarget. r=jnicol
This commit is contained in:
parent
974151839a
commit
34d30ff986
@ -444,6 +444,9 @@ TextureClient::Lock(OpenMode aMode)
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(!mIsLocked);
|
||||
if (!IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (mIsLocked) {
|
||||
return mOpenMode == aMode;
|
||||
}
|
||||
@ -493,7 +496,7 @@ TextureClient::Unlock()
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(mIsLocked);
|
||||
if (!mIsLocked) {
|
||||
if (!IsValid() || !mIsLocked) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -622,7 +625,7 @@ TextureClient::BorrowDrawTarget()
|
||||
// but we should have a way to get a SourceSurface directly instead.
|
||||
//MOZ_ASSERT(mOpenMode & OpenMode::OPEN_WRITE);
|
||||
|
||||
if (!mIsLocked) {
|
||||
if (!IsValid() || !mIsLocked) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user