From 8c8074724180333b322d504a852baba6ec3c435c Mon Sep 17 00:00:00 2001 From: Cosmin Sabou Date: Fri, 3 Mar 2023 01:02:21 +0200 Subject: [PATCH] Backed out changeset 451ce16f5fd1 (bug 1817691) for causing region update related assertion failures. CLOSED TREE --- gfx/layers/NativeLayerCA.mm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gfx/layers/NativeLayerCA.mm b/gfx/layers/NativeLayerCA.mm index 2f5e06c94825..104d24cc9b1f 100644 --- a/gfx/layers/NativeLayerCA.mm +++ b/gfx/layers/NativeLayerCA.mm @@ -1230,9 +1230,6 @@ void NativeLayerCA::HandlePartialUpdate(const MutexAutoLock& aProofOfLock, // some combination of the update region and the front surface's valid region. Because // this check is complex, we only do it in Nightly. // - // As a special case, we'll tolerate a remaining area that is only one pixel tall or wide, - // which is also tolerated in NotifySurfaceReady (until Bug 1818540 is fixed). - // // Also, since this condition will hit a later release assert in NotifySurfaceReady, we // choose to crash now. @@ -1246,10 +1243,7 @@ void NativeLayerCA::HandlePartialUpdate(const MutexAutoLock& aProofOfLock, exposedRegion.AndWith(mFrontSurface->mInvalidRegion); } - gfx::IntRegion invalidRegion(exposedRegion); - invalidRegion.SubOut(aUpdateRegion); - IntRect invalidBounds = invalidRegion.GetBounds(); - if (invalidBounds.width > 1 || invalidBounds.height > 1) { + if (!aUpdateRegion.Contains(exposedRegion)) { // Let's crash now instead of later. std::ostringstream reason; reason << "The update region " << aUpdateRegion << " must cover the invalid region "