Closed
Bug 1451439
Opened 6 years ago
Closed 6 years ago
Often some elements are jumping one pixel up and down while scrolling up/down. Snap async scroll offsets to pixels
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox-esr60 | --- | unaffected |
firefox59 | --- | unaffected |
firefox60 | --- | unaffected |
firefox61 | --- | disabled |
firefox62 | --- | disabled |
firefox63 | --- | disabled |
firefox64 | --- | fixed |
People
(Reporter: jan, Assigned: cpearce)
References
(Blocks 3 open bugs, )
Details
(Keywords: nightly-community, regression)
Attachments
(3 files)
Debian Testing, KDE, Radeon RX480, 2560x1440 mozregression --good 2018-03-14 --bad 2018-03-16 --pref gfx.webrender.all:true general.autoScroll:true browser.startup.blankWindow:false browser.tabs.drawInTitlebar:true startup.homepage_welcome_url:"https://www.mozilla.org/de/firefox/new/" > 5:02.90 INFO: Last good revision: c9cb048dfd438c26e58e416338a6cca24226ae80 > 5:02.90 INFO: First bad revision: fc150f21f7fac1be6f31ca8d950570751ddad6aa > 5:02.90 INFO: Pushlog: > https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c9cb048dfd438c26e58e416338a6cca24226ae80&tochange=fc150f21f7fac1be6f31ca8d950570751ddad6aa > fc150f21f7fa Nicolas Silva — Bug 1437032 - Rely on WebRender to pixel snap gradients instead of doing it when building the display list. r=mstange
Reporter | ||
Comment 1•6 years ago
|
||
At first I thought this would be related to bug 1434503 and friends. If you think the bug description is not appropriate I would have to search for another regression about this description then.
Reporter | ||
Comment 2•6 years ago
|
||
Could you have a look, please? mozregression points to your change.
Flags: needinfo?(nical.bugzilla)
Comment 3•6 years ago
|
||
I think that this is caused by different types of display items not using the same strategy for pixel-snapping. I think that in the long run we should not do any pixel snapping while building the display list and only rely on WebRender's pixel snapping logic, bt the trickiness will probably be in moving over to this without upsetting loads of reftests (I guess we'll just have to bite the bullet).
Assignee: nobody → nical.bugzilla
Flags: needinfo?(nical.bugzilla)
Reporter | ||
Comment 4•6 years ago
|
||
Same regression range. URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1208646
Updated•6 years ago
|
Blocks: stage-wr-trains
Priority: -- → P2
Reporter | ||
Comment 5•6 years ago
|
||
Win10, Radeon RX480 comment 0 looks the same. comment 4 is reproducible at 110% zoom.
OS: Linux → All
Reporter | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
I think snapping scroll offsets to device pixels would fix this. Lee, you tried this before but ran into problems - do you remember what they were?
Flags: needinfo?(lsalzman)
Reporter | ||
Comment 7•6 years ago
|
||
GTX 1060, Debian Testing, KDE, 2560x1440 I still see this bug, bug 1434503, bug 1432046 (flickering line), bug 1434047. (And I think bug 1464371 might be the same.)
Comment 8•6 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #6) > I think snapping scroll offsets to device pixels would fix this. Lee, you > tried this before but ran into problems - do you remember what they were? Those problems were related to intricacies of text, in that the text run itself has an offset and individual glyphs have an offset. That wouldn't be relevant to other primitives.
Flags: needinfo?(lsalzman)
Comment 9•6 years ago
|
||
Oh, then I think I misunderstood your previous implementation idea. In this bug, I think we should snap the scroll position on composition, so that all display items are drawn with only an integer offset compared to their main thread position, which will make all items snap consistently during scrolling.
Comment 10•6 years ago
|
||
This is very easy to see on youtube. Just go to any video with comments, and then scroll sloooowly. The "up vote" and 'down vote" thumb buttons jiggle up and down
Comment 11•6 years ago
|
||
I'm making this the authoritative bug for snapping async scroll offsets. We have a bunch of open bugs that should be fixed by doing that.
Reporter | ||
Updated•6 years ago
|
status-firefox63:
--- → disabled
status-firefox64:
--- → affected
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
darkspirit: Can you still repro this specific bug? There are a number of bugs about scrolling and snapping, but I can't repro this specific case on Win10.
Flags: needinfo?(jan)
Comment 13•6 years ago
|
||
I can still reproduce this one. You might need to experiment with different zoom levels and different input mechanisms for scrolling. Autoscroll works best.
Flags: needinfo?(jan)
Updated•6 years ago
|
Assignee: nical.bugzilla → cpearce
Assignee | ||
Comment 14•6 years ago
|
||
As markus suggested in comment 9, snapping scroll offsets to device pixel offsets (I did it in APZCTreeManager::SampleForWebRender()) fixes the flickering on scrolling (for the cases I can repro at least).
Assignee | ||
Comment 15•6 years ago
|
||
When scrolling very slowly, sometimes some things can jump up and down, causing flickering. This is because the scroll offset that the APZC passes to WebRender isn't snapped to pixel boundaries; things drawn relative to that can move up or down depending on how their boundaries round. So round the scroll offset to device pixel boundaries before passing it to WebRender. This eliminates the flicker in cases I've been able to reproduce.
Assignee | ||
Comment 16•6 years ago
|
||
The patch here causes flickering on https://codepen.io/Aux-Lux/pen/mxdbOX (which was reported as in issue in bug 1444090, and subsequently resolved as WFM).
Reporter | ||
Updated•6 years ago
|
Comment 17•6 years ago
|
||
Comment on attachment 9011972 [details] Bug 1451439 - Snap scroll offset to pixel boundaries before passing to WebRender. r?botond Botond Ballo [:botond] has approved the revision.
Attachment #9011972 -
Flags: review+
Reporter | ||
Comment 18•6 years ago
|
||
This also fixes the flickering horizontal line on the green "back" box (in the vertical middle of the page): https://3dtransforms.desandro.com/cube
Assignee | ||
Comment 19•6 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #16) > The patch here causes flickering on https://codepen.io/Aux-Lux/pen/mxdbOX > (which was reported as in issue in bug 1444090, and subsequently resolved as > WFM). I actually see this in Nightly if I resize the browser window from the RHS, so I'm going to assume it's not a regression from my patch. I have a fix for that too, will put that in a new bug. I'll land this now.
Comment 20•6 years ago
|
||
Pushed by cpearce@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bdc90f28bd84 Snap scroll offset to pixel boundaries before passing to WebRender. r=botond
Comment 21•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bdc90f28bd84
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•