Closed Bug 785588 Opened 13 years ago Closed 13 years ago

Janky scrolling with parallax background effect

Categories

(Core :: Graphics, defect)

x86_64
macOS
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: jruderman, Assigned: roc)

References

()

Details

Attachments

(1 file)

Scrolling http://chrsl.net/gospel/ doesn't feel smooth at all. The background almost seems to lag behind the text. [Nightly 17.0a1 (2012-08-22), pixel-scrolling with two fingers on trackpad]
stellar.js runs a requestAnimationFrame loop which polls the current scroll position and updates background positions accordingly. I think the problem is AsyncScroll adds itself as a Flush_Display refresh observer, meaning that requestAnimationFrame callbacks run before the scroll event. So the sequence of events is: 1) user triggers scroll 2) refresh driver runs: 2a) stellar.js's requestAnimationFrame callback runs, sees nothing has changed 2b) AsyncScroll callback runs and updates scroll position 2c) repaint the window due to scroll 3) refresh driver runs again 3a) stellar.js's requestAnimationFrame callback runs, updates background for new scroll position 3b) repaint the window again for the new background
Attached patch fixSplinter Review
Assignee: nobody → roc
Attachment #657956 - Flags: review?(tnikkel)
Attachment #657956 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b354d6a9c90 After this has landed for a bit, I think we should lift it up to Aurora, but not Beta. This is not a regression and the way stellar.js polls scroll positions with requestAnimationFrame (and not, say, an onscroll handler) is a bit strange.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Blocks: 791424
It still doesn't feel smooth to me. I filed bug 791424 rather than reopening this.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: