Closed Bug 1659636 Opened 5 months ago Closed 5 months ago

Make NotifyUpdateScreenMetrics more accurate

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(3 files)

GeckoView java code wants to know the root content APZC's async scroll offset (and async zoom level).

APZ has a mechanism to give GeckoView this information during composites, using UiCompositorControllerParent::NotifyUpdateScreenMetrics.

However, we're a bit confused about what exactly we send it. Here are some of the things we could send it:

  1. The latest, hot-of-the-press visual scroll offset which due to the frame delay isn't being composited yet.
  2. The visual scroll offset being composited.
  3. The main thread's last snapshot of the visual scroll offset.
  4. The layout scroll offset.

Currently, the WR codepath sends (1) and the Layers codepath sends (4). Bug 1519285 improves things slightly and has the Layers codepath send (3).

Based on discussion here, I believe what we want to be sending it is (2) in both codepaths.

Being in gfx/layers/composite, AsyncCompositionManager.h does not
get to include CompositorBridgeParent.h (which is in gfx/layers/ipc)
as simply '#include "CompositorBridgeParent.h"'.

Depends on D87664

Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3c9d5f8ee7e1
Fix variable naming. r=kats
https://hg.mozilla.org/integration/autoland/rev/250b5004cf20
Fix CompositorBridgeParent.h include in AsyncCompositionManager.h. r=kats
https://hg.mozilla.org/integration/autoland/rev/c9b17e5a44a8
Use the effective scroll offset and zoom in NotifyUpdateScreenMetrics. r=kats
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.