Closed Bug 1284553 Opened 8 years ago Closed 8 years ago

APZ repaint requests can stop getting processed due to slight resolution mismatch

Categories

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

50 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox47 --- unaffected
firefox48 --- fixed
firefox49 --- fixed
firefox50 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

In bug 1279299 the reporter was seeing various checkerboarding-type issues. We got logs and one of the causes was that the presShell-resolution check at [1] was tripping due to fuzzy differences, and so the repaint requests were getting thrown out. This code was added in bug 1039818 to catch scenarios where APZ was overwriting the resolution change on the main thread (from a meta-viewport tag). It's correct, but I think the comparison should be a fuzzy-comparison because the resolution from the metrics is multiplied by the async zoom before getting set, and that can introduce rounding error.

In the specific case we got logging for, this was the log output:
  Skipping paint due to presShell resolution mismatch (0.507515 != 0.507515)
So the difference in resolution values was less than 1e-6.

[1] http://searchfox.org/mozilla-central/rev/a7c8e9f3cc323fd707659175a46826ad12899cd1/gfx/layers/apz/util/APZCCallbackHelper.cpp#252
Comment on attachment 8768106 [details]
Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests.

https://reviewboard.mozilla.org/r/62420/#review59418
Attachment #8768106 - Flags: review?(botond) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/20a909c817cf
Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests. r=botond
https://hg.mozilla.org/mozilla-central/rev/20a909c817cf
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment on attachment 8768106 [details]
Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests.

Approval Request Comment
[Feature/regressing bug #]: bug 1039818 but only exposed by APZ on Fennec
[User impact if declined]: in some cases repaints stop happening, and the user can end up in perma-checkerboard or perma-blurry states which is pretty bad.
[Describe test coverage new/current, TreeHerder]: tested by user in bug 1279299. Hard to write an automated test for this.
[Risks and why]: Pretty low risk, small change in well understood code
[String/UUID change made/needed]: none
Attachment #8768106 - Flags: approval-mozilla-beta?
Attachment #8768106 - Flags: approval-mozilla-aurora?
Comment on attachment 8768106 [details]
Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests.

This patch fixes a UX experience. Take it in 48 beta 7 and aurora.
Attachment #8768106 - Flags: approval-mozilla-beta?
Attachment #8768106 - Flags: approval-mozilla-beta+
Attachment #8768106 - Flags: approval-mozilla-aurora?
Attachment #8768106 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: