Don't assert about borrowed DT refcounts when async painting. (bug 1381393, r=mattwoodrow)
This commit is contained in:
@@ -509,7 +509,7 @@ TextureClient::Lock(OpenMode aMode)
|
||||
|
||||
auto format = GetFormat();
|
||||
if (mIsLocked && CanExposeDrawTarget() &&
|
||||
aMode == OpenMode::OPEN_READ_WRITE &&
|
||||
(aMode & OpenMode::OPEN_READ_WRITE) == OpenMode::OPEN_READ_WRITE &&
|
||||
NS_IsMainThread() &&
|
||||
// the formats that we apparently expect, in the cairo backend. Any other
|
||||
// format will trigger an assertion in GfxFormatToCairoFormat.
|
||||
@@ -557,7 +557,8 @@ TextureClient::Unlock()
|
||||
mBorrowedDrawTarget->DetachAllSnapshots();
|
||||
// If this assertion is hit, it means something is holding a strong reference
|
||||
// to our DrawTarget externally, which is not allowed.
|
||||
MOZ_ASSERT(mBorrowedDrawTarget->refCount() <= mExpectedDtRefs);
|
||||
MOZ_ASSERT_IF(!(mOpenMode & OpenMode::OPEN_ASYNC_WRITE),
|
||||
mBorrowedDrawTarget->refCount() <= mExpectedDtRefs);
|
||||
|
||||
mBorrowedDrawTarget = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user