Open Bug 1631015 Opened 4 years ago Updated 24 days ago

Webrender doesn't treat mousewheel initiated desktop-zooming as async zooming

Categories

(Core :: Graphics: WebRender, defect, P3)

Desktop
Unspecified
defect

Tracking

()

People

(Reporter: jnicol, Unassigned)

References

(Blocks 3 open bugs)

Details

STR: enable apz.allow_zooming and set mousewheel.with_shift.action = 5. Zoom in to a page with shift+mousewheel.

AsyncPanZoomController::IsAsyncZooming() will return false, therefore webrender api's Transaction::set_is_transform_async_zooming() will always be called with false. This means webrender will not apply zooming-related optimizations, such as disabling picture caching whilst zooming, or using a local raster space for glyphs.

On Matrix Botond wrote:

mState could well be NONE when the sampler thread queries this value, since mousewheel events are independent of each other, there is nothing to mark the start or end of a "gesture".
I wonder if perhaps querying the PanZoomState is not the best way to determine if we're async zooming
I think what we really want to know is, is there an async scale being applied to content such that the main thread hasn't repainted at that scale yet
We can query that via Metrics().GetAsyncZoom() != 1.0
The downside of this is that during a pinch-zoom gesture, this condition could briefly fluctuate to false and back to true, if we have a composited frame where the main thread just repainted at a new resolution and additional pinching hasn't been performed

This downside could be fixed by oring the existing condition with Botond's suggested change.

However, there would still be a consequence that once a pinch gesture has ended, we would treat the zoom as ongoing until the main thread has caught up with webrender. I don't know if that would actually cause any issues in practice. And could probably be worked around by adding another flag which we set to false when the PanZoomState changes from PINCHING to something else.

Priority: -- → P3
Hardware: Unspecified → Desktop

ni-ing Kris for triage for DTZ

Flags: needinfo?(ktaeleman)
Flags: needinfo?(ktaeleman)
Severity: -- → normal

The severity field is not set for this bug.
:jbonisteel, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbonisteel)
Severity: normal → S3
Flags: needinfo?(jbonisteel)
Blocks: wr-todos
You need to log in before you can comment on or make changes to this bug.