Closed Bug 1323320 Opened 8 years ago Closed 8 years ago

Intermittent image/image-srcset-basic-selection-width-10x-ref.html | assertion count 2 is more than expected 0 assertions from ASSERTION: Displayport must be a valid texture size: 'result.height <= GetMaxDisplayPortSize(aContent)'

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: kats)

References

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:product])

Attachments

(1 file)

Component: Layout → Graphics: WebRender
I'll investigate this.
Assignee: nobody → bugmail
So the test in question is setting a reftest-zoom level of 10x, which drops the auPerDevPixel value to 6. And sometimes we run into the scenario where the displayport base rect is set to 48000 x 60000 AUs which ends up being 8000 x 10000 dev pixels which exceeds the max texture size of 8192. Note that the inflation/alignment code is working fine, but the code doesn't account for the possibility of a base rect that already exceeds the max texture size. I suspect this only happens in this case because of a race condition where the zoom level is changed and we immediately recompute the displayport, while it takes a round-trip to the APZ thread before the base rect is updated to account for the new zoom level.
Timothy, does comment 8 make sense? If so, does it seem reasonable to recompute the displayport base rect somewhere inside nsPresContext::AppUnitsPerDevPixelChanged()? I guess we'd only want to do it for the root scrollframe of the presShell. Also FWIW I verified in [1] that the displayport base rect is *not* getting set at [2] for this bug. [1] https://treeherder.mozilla.org/logviewer.html#?job_id=120791855&repo=try&lineNumber=23791 [2] http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/layout/base/PresShell.cpp#5973
Flags: needinfo?(tnikkel)
Comment 8 sounds reasonable. I think that this image visibility code is the only place (on the layout side) where we could use an outdated base rect that hasn't been adjusted for a zoom level change. Any other displayport getter should be setting the base rect beforehand. So we could just ignore the displayport in MarkFramesInSubtreeApproximatelyVisible if it's absurdly large (like we already do if there is no baserect set). Or just ignore the assertion and use the too-big displayport if we are getting the displayport via GetDisplayPortForVisibilityTesting. Changing the zoom by a factor of 10 is only a thing we do in tests, users will be changing the zoom in small increments: even if they do multiple small increments there is likely a delay because each one requires a key press.
Flags: needinfo?(tnikkel)
(In reply to Timothy Nikkel (:tnikkel) from comment #10) > Or just ignore the assertion and > use the too-big displayport if we are getting the displayport via > GetDisplayPortForVisibilityTesting. I chose to go with this approach, as it seemed straightforward. Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=dfc070f5227e225a359b398b58b3aab3c38ccda2
Sadly there are still failures. I guess I only investigated/patched one of the multiple codepaths that triggers this assertion. I didn't look closely to see if the remaining assertions are similar or what, will do that tomorrow.
Comment on attachment 8897075 [details] Bug 1323320 - Skip displayport size assertions when getting the displayport for visibility testing. https://reviewboard.mozilla.org/r/168362/#review173676 Looks great, thanks!
Attachment #8897075 - Flags: review?(tnikkel) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b52f8da62f7 Skip displayport size assertions when getting the displayport for visibility testing. r=tnikkel
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
The patch that landed seems to have fixed this, according to the OF graph.
Whiteboard: [stockwell fixed:product]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: