Closed Bug 1707044 Opened 4 years ago Closed 4 years ago

Remove invalid assert in AnimationFrameRecyclingQueue::RecycleFrame

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/image/AnimationFrameBuffer.cpp#412

The following assert:

MOZ_ASSERT(mFirstFrameRefreshArea.Contains(entry.mDirtyRect));

is likely not true, because entries might have the full rect area used temporarily:

https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/image/AnimationFrameBuffer.cpp#315

https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/image/AnimationFrameBuffer.cpp#351

and it doesn't get reset until the animation is complete:

https://searchfox.org/mozilla-central/rev/72951aa826642f048da4c6b71b8b3e36a9606dcd/image/AnimationFrameBuffer.cpp#468

which probably happens before the assert in question happens. So some frames might be marked with a dirty area larger than necessary out of caution. When the animation has its first pass, we shrink that area, which means it is no longer guaranteed to contain the conservative dirty area estimates we made earlier.

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.

Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6edd140972fb Remove invalid assert in AnimationFrameRecyclingQueue::RecycleFrame. r=tnikkel
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: