зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1882538 - Convert some TextureClient assertions into warnings. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D206810
This commit is contained in:
Родитель
91d3dc863c
Коммит
f24f2d4861
|
@ -663,14 +663,15 @@ PersistentBufferProviderShared::BorrowSnapshot(gfx::DrawTarget* aTarget) {
|
|||
|
||||
if (mDrawTarget) {
|
||||
auto back = GetTexture(mBack);
|
||||
MOZ_ASSERT(back && back->IsLocked());
|
||||
if (NS_WARN_IF(!back) || NS_WARN_IF(!back->IsLocked())) {
|
||||
return nullptr;
|
||||
}
|
||||
mSnapshot = back->BorrowSnapshot();
|
||||
return do_AddRef(mSnapshot);
|
||||
}
|
||||
|
||||
auto front = GetTexture(mFront);
|
||||
if (!front || front->IsLocked()) {
|
||||
MOZ_ASSERT(false);
|
||||
if (NS_WARN_IF(!front) || NS_WARN_IF(front->IsLocked())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -748,12 +748,10 @@ void TextureClient::ReadUnlock() {
|
|||
}
|
||||
|
||||
bool TextureClient::Lock(OpenMode aMode) {
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(!mIsLocked);
|
||||
if (!IsValid()) {
|
||||
if (NS_WARN_IF(!IsValid())) {
|
||||
return false;
|
||||
}
|
||||
if (mIsLocked) {
|
||||
if (NS_WARN_IF(mIsLocked)) {
|
||||
return mOpenMode == aMode;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче