Closed Bug 1348414 Opened 3 years ago Closed 3 years ago

reftest-wait seems to snapshot at the wrong time with WR

Categories

(Core :: Graphics: WebRender, defect)

51 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mchang, Assigned: mchang)

References

Details

Attachments

(1 file, 1 obsolete file)

I'm getting failures not due to wrong rendering, but seems like it's snapshotting too early or before WR finishes rendering an update after a reftest-wait.

See /layout/reftests/bugs/1003425-1.html
Tracked this down. We keep sending an EmptyRect during invalidation detection in [1]. This empty rect is passed onto NotifyPaintEvent, which is fired after we paint. The reftest framework looks for client rects to determine that it should snapshot again. Since we return an empty rect, the reftest doesn't think it needs to snapshot again and dies.

I tried caching the display item geometry via a LayerTreeProperty and then call nsDisplayList::ComputeInvalidationRegion. However, the display item's lifetimes are shorter than the Layer trees. Also, since we recycle display item layers, there's no guarantee that the display item in a recycled layer would be the same time and the geometry would apply to check against anyway.

Going back through some old comments, I saw [2]. Specifically, I think we'd change the tests to just wait until there are no more scheduled paints.

[1] http://searchfox.org/mozilla-central/source/layout/painting/nsDisplayList.cpp#2281
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1337130#c14
See Also: → 1348755
Attachment #8849765 - Flags: review?(matt.woodrow)
Blocks: 1348755
Fixed a bug where we wouldn't detect if WR was enabled on non-windows platforms.
Attachment #8849765 - Attachment is obsolete: true
Attachment #8849765 - Flags: review?(matt.woodrow)
Attachment #8850194 - Flags: review?(matt.woodrow)
Attachment #8850194 - Flags: review?(matt.woodrow) → review+
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/f39045b90aa9
Always snapshot after no more paints are pending if WR is enabled. r=mattwoodrow
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.