Sadrul, do you remember what issues we ran into when attempting to move fling into the browser? Would touch and touchpad latching resolve those issues?
+rjkroege@ in case I am forgetting something.On Mon, Nov 28, 2016 at 2:56 PM, Tim Dresser <tdre...@google.com> wrote:Sadrul, do you remember what issues we ran into when attempting to move fling into the browser? Would touch and touchpad latching resolve those issues?
From what I remember: I don't think there were any unsolvable/difficult technical issues that prevented it from happening. There were initially some discussion on whether we wanted it at all (as in, whether this would make things better/worse/not much difference), and then the owners just sort of moved onto other things.Some relevant CLs (some WIP, some experimental) from that time in history:
Happy to talk about any of these changes if there are specific questions etc.
Right now we sometimes fling on main, and sometimes on the compositor.Ideally we'd deal with fling in a single place - only driving fling in the compositor / DisplayCompositor process sounds reasonable to me.The advantage of doing this in the browser process would be that we could (at least in theory) shield all processes but the browser process from platform specific touchpad details.
Maybe we should start by just getting rid of the main thread fling path - it's possible that would actually be simpler than doing the touchpad latching work on main in addition to the compositor side implementation.
The fling still needs to be processed on main if the scroll needs to take place on main - for instance with low DPI text, or scrollers with rounded corners etc. We can generate the scroll gestures in the compositor (or browser) process though.
The target scrollable doesn't change on fling start, it latches to the current scroller.
I found this old bug with very interesting discussions on browser-side fling.
Based on my read, the main concerns were:
- Performance implication of a race condition between BeginFrame signal & fling IPC from browser.
- I believe this goes away once we have BeginFrame message on all platforms (issue 305237)
- The fact that this does not really remove much complexity because we have a different hit-testing (latching) semantic between touchpad & touchscreen flings events
- This is no longer an issue with our new consistent latching behavior.
- Adding lot of complexity to browser by requiring it to maintain state necessary for knowing that the fling gesture is active or not.
- This seems to be needed to correctly dispatch FlingCancel event. I don't know what is exactly involved but seems like something that we should be able to achieve by expanding out gesture ack disposition machinery.
So It seems that most of the major objections are now addresses and we should at least experiment with this next quarter.
BTW, if we are to have the fling curve run and generate GestureScrollUpdates by the Display Compositor instead of the Browser UI process then I suspect we need to send "ACK" back to this process so that it knows if the event are being consumed by renderer or not. The advantage of doing this in Browser is that it uses the existing ACK machinery instead of adding a new one.
Majid
On Mon, Dec 5, 2016 at 2:49 PM Timothy Dresser <tdre...@chromium.org> wrote:
+threaded-rendering-dev@chromium.org is working on getting more scrolling on the compositor thread.