From dfae5e6405fcfec486431b0b53cfcad8e6d1b325 Mon Sep 17 00:00:00 2001 From: Andrew Osmond Date: Fri, 23 Apr 2021 02:21:00 +0000 Subject: [PATCH] Bug 1707044 - Remove invalid assert in AnimationFrameRecyclingQueue::RecycleFrame. r=tnikkel The assert in question is overly conservative. The dirty rects may be calculated using a more conservative estimate of the whole frame, and after the animation has completed its first pass, we may have determined that it is unnecessarily too large and shrink it accordingly. There may still be frames lingering with the old larger rect however, and trip this assert falsely. Differential Revision: https://phabricator.services.mozilla.com/D113155 --- image/AnimationFrameBuffer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/image/AnimationFrameBuffer.cpp b/image/AnimationFrameBuffer.cpp index bcaacfce5f3b..81ef7cf0706f 100644 --- a/image/AnimationFrameBuffer.cpp +++ b/image/AnimationFrameBuffer.cpp @@ -408,8 +408,11 @@ RawAccessFrameRef AnimationFrameRecyclingQueue::RecycleFrame( // area. We know that all of the frames still in the recycling queue // need to take into account the same dirty rect because they are also // frames which cross the boundary. + // + // Note that this may actually shrink the dirty rect if we estimated it + // earlier with the full frame size and now we have the actual, more + // conservative aggregate for the animation. for (RecycleEntry& entry : mRecycle) { - MOZ_ASSERT(mFirstFrameRefreshArea.Contains(entry.mDirtyRect)); entry.mDirtyRect = mFirstFrameRefreshArea; } // Until we advance to the first frame again, any subsequent recycled