[maple] adjustViewportWithThrottling is unnecessary




Firefox for Android
6 years ago
6 years ago


(Reporter: kats, Assigned: kats)


Firefox Tracking Flags

(Not tracked)



(1 attachment)

jrmuizel pointed out during a discussion today that there is a recently-introduced refresh driver in gecko which takes generates invalidations at 60fps. This means if scrollTo is called a bunch of times within a single tick interval of the refresh driver, it will still only trigger a single invalidation and draw. This makes the 25ms throttling in GeckoLayerClient.adjustViewportWithThrottling unnecessary and in fact makes latency worse by adding another clock to the pipeline. That throttling should be taken out
Also note that with bug 730687 applied, we'll be sending fewer viewport adjustments anyway as that filters out viewport adjustments that keep us within the central area of the display port.
Depends on: 730687
Created attachment 601052 [details] [diff] [review]
Take out throttling code
Attachment #601052 - Flags: review?(pwalton)

Comment 3

6 years ago
Just to note, we coalesce multiple viewport events in the event queue in nsAppShell, so indeed this shouldn't be too much of a problem, Gecko-side.

Java-side, are we sure that creating the event isn't too much work to do at 60hz? I guess it's happening in a separate thread to the UI, so that's not too bad, but probably good to test this on a single-core device.
Comment on attachment 601052 [details] [diff] [review]
Take out throttling code

Review of attachment 601052 [details] [diff] [review]:

r=me, assuming that this doesn't regress performance.
Attachment #601052 - Flags: review?(pwalton) → review+
Tested this on the HTC Desire HD, there was no significant difference in average values for the compositor-reported frame timings (~24ms with spikes when texture upload happens) for both of them. It also felt about the same from a subjective point of view.

Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.