Closed Bug 860162 Opened 11 years ago Closed 11 years ago

AsyncPanZoomController doesn't apply proper scroll compensation if the root layer has a scale

Categories

(Core :: Graphics: Layers, defect)

23 Branch
All
Android
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 866265

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

The scrollCompensation calculation in AsyncPanZoomController appears to be wrong, causing much jank-like behaviour and general wonkiness on Fennec. I have a patch that fixes this but I don't know if it helps or hurts B2G. I'll need to get a B2G build set up so I can test it. Putting the patch up here in case people want to stare at it for a while, because it takes a while to understand what's going on.
OS: Gonk (Firefox OS) → Android
Comment on attachment 735595 [details] [diff] [review]
Fix scrollCompensation

Getting a B2G build up and running is proving to be more impossible than I expected it to. I'll keep at it but in the meantime if you have some spare cycles and can test out this patch to ensure that B2G isn't adversely affected that would be great.
Attachment #735595 - Flags: feedback?(ajones)
The patch isn't working properly on b2g. It scrolls faster than your finger when zoomed out and slower than your finger when zoomed in.
Ok, I finally got B2G up and running in the emulator-x86 configuration and can reproduce the problem. I should be able to debug it and figure out what's going on.
Naive questions, based on the patch: what's special about the root transformation?  I can see either not caring, or caring about the cumulative transformation above the node.  As I said, naive question.
I think we're cleaning up code while still preserving the assumptions that only the direct child of the root can be a APZC for now.

We should watch out when computing the cumulative transform because if we're rendering to an intermediate surface then the cumulative transform stops there, at least the one used to position the layers. We'll need to be careful how to handle that with APZC otherwise we might see some nasty glitches as layout toggles the use of intermediate surfaces.
(In reply to Milan Sreckovic [:milan] from comment #4)
> Naive questions, based on the patch: what's special about the root
> transformation?  I can see either not caring, or caring about the cumulative
> transformation above the node.  As I said, naive question.

In Fennec (and I thought in B2G as well) the scale transformation is applied on the root layer. This is "for historical reasons" (i.e. because bug 732971 was not, and still isn't, fixed). Reading the scale from the layer bound to the APZC, in Fennec, gives 1.0. It's not a cumulative transformation. I hope that answers your question, but I may have misunderstood.
Cool, just checking.  Perhaps worth an assert or two in case these assumptions change...
Attachment #735595 - Flags: feedback?(ajones) → feedback-
The correct fix here involves fixing bug 732971 first, I think.
Depends on: 732971
This is fixed by part 4 on bug 866265.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: