Closed Bug 1733732 Opened 3 years ago Closed 3 years ago

do we still want the 4x displayport multiplier on android from the old layers low precision buffer code?

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: tnikkel, Assigned: jnicol)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/c3d7964c593e0bedabea2fea0b35ba243cf9e696/layout/base/DisplayPortUtils.cpp#595

I believe the low precision buffer code used to operate like this with layers: the displayport had a 4x multipler applied to it, and we also had a critical displayport without the 4x multiplier. The content of the displayport was rasterized at 1/4 resolution to balance that, and the content of the critical displayport was rasterized at normal resolution. The code to do the rasterization at a lower resolution was part of the layers backend, so its gone. So we are left with a displayport with a 4x multiplier and a critical displayport that is (or should be) unused as it has no special treatment.

Webrender should still only be rasterizing what's visible so it shouldn't affect that, except for content that we rasterize in the content process. So this will just increase displaylist building time vs desktop (and be neutral vs the old layers backend on android). Unless we have significant fallback content.

We should evaluate whether we still want this multiplier, and if so what value do we want it to have as the trade offs here could very well be different now that webrender is everywhere. If we keep this multiplier around we should rename the pref and maybe restructure/simplify the code to make it reflect what we are trying to accomplish better.

Flags: needinfo?(jnicol)

I'm inclined to say we want to remove it, since we only render what's on the screen in webrender. but the consequences are almost certainly more complex than that. So perhaps as a first step I should run with it set to 1.0 and see if I notice anything. Then we can try changing the pref to 1.0 but keeping all the code, and see if any users report any problems or if telemetry changes. Then finally we can think about removing the code if all is well.

Flags: needinfo?(jnicol)

On Android we currently apply a 4x multiplier to the size of the
display port. When using the old Layers rendering backend, we would
render the non-multiplied "critical display port" at normal
resolution, and if required we would render the inflated display port
in low resolution. This helped avoid checkerboarding.

With webrender we only render what is currently visible on the
screen, so having an inflated display port is probably less
useful. There are still circumstances when it could help avoid
checkerboarding, for example when the main thread is busy it allows
for more scrolling without a new scene being built. But this benefit
is likely outweighed by the increased display list and scene building
time caused by the larger display port.

As a first step this patch simply sets the layers.low-precision-buffer
pref to false, which will prevent us from increasing the display port
size. This will make the change easy to revert in case it does cause
any issues. If this has the desired effect then we can remove the
relevant code in a follow up patch.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED

I haven't noticed any issues from running this locally for a few days, and it does indeed show a decreased display list and scene building time on my device. So let's proceed to disabling the pref

Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa6f6109e361
Disable display port multiplier on Android. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Regressions: 1763503
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: