Closed Bug 1198966 Opened 9 years ago Closed 9 years ago

Let sync scrolling bypass the Transaction, let APZ scroll them periodically

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox43 --- affected

People

(Reporter: BenWa, Unassigned)

Details

Attachments

(2 files)

With APZ almost ready we're still don't have any improvements line up for sync scrolling (Scrollbar scrolling, key presses, Javascript scrolling). Ideally, the first two at least, would be handled in the compositor but it's not easy.

The problem is that on certain page+hardware we can't do main thread transaction within 16 ms (at 60 FPS). With vsync we will effectively fall back to 30 FPS or less. The problem is that for each frame we have to Build DisplayList + Build Layer Tree. Note that we rarely have to rasterize with displayport snapping. So we have a lot of overhead each frame when we only need to paint occasionally like we do with async scrolling.

What I'm suggesting is that when a frame is scrolled synchronously instead of running a full transaction just to update the scroll position we instead notify the APZ using a new message, which can output the next frame immediately. Eventually as the displayport needs an update, APZ should detect this just fine and send an updated displayport message to the main thread like it currently does with async scrolling.

This wont let us do sync scrolling when the main thread is not responding, but on pages+hardware where we can't build Transactions at 60Hz we should be able to scroll smoothly through APZ.
Nevermind, the test was not conclusive
Doing this isn't quite as simple as patching ScrollFrameHelper::ScrollToImpl to not schedule a paint. I'm still getting paints. It must be because the scrollbar widget is updating it's position and also scheduling a paint.
Attached file Synthetic testcase
Chrome seems to special case scrollbar dragging. Selecting text is slow as expected.
Bug 1198966 - Let sync scrolling bypass the Transaction, let APZ drive the scrolling.
Comment on attachment 8653683 [details]
MozReview Request: Bug 1198966 - Let sync scrolling bypass the Transaction, let APZ drive the scrolling.

Bug 1198966 - Let sync scrolling bypass the Transaction, let APZ drive the scrolling.
So far we're not really liking the outcome of this patch. We're pursing another approach. WONTFIX.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: