Closed Bug 881451 Opened 11 years ago Closed 10 years ago

ThebesLayerComposite::GetCompositionBounds() needs to be fixed up in various ways

Categories

(Core :: Graphics: Layers, defect)

23 Branch
All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: kats, Assigned: cwiiis)

References

Details

(Whiteboard: [leave open])

Attachments

(1 file)

There are at least a couple of problems with this code:
1) The logic at the top of the loop to update the scrollableLayer variable and potentially end up using it with a different parentMetrics seems very wrong.
2) The function doesn't appear to take into account any intermediate surfaces it might be rendering to.

BenWa and I were discussing this code today and it will probably misbehave when there are multiple scrollable layers in the tree, such as the multi-apzc project is designed to allow, so this will need to be fixed up.
There also appear to be various coordinate system mismatches in this function. The most obvious one is the calculation of the "scrollOffset" variable, which takes a CSSPixel value, multiplies it by LayerPixelsPerCSSPixel to get the LayerPixel value, and then divides it by something which gets back LayoutDevicePixels (or maybe CSSPixels - I'm still trying to figure that out). It then subtracts that value from a LayerPixel "content" variable, which is wrong no matter how you slice it.
Moving to depend on bug 776030 because it blocks only Fennec APZC.
Blocks: apz-fennec
No longer blocks: multi-apzc
Blocks: 931823
So we just don't use this code at all anymore. Will attach a patch that removes the unused bits.
This code could probably use an auditing, but if we just end up shrinking it into nothingness, that'd do too.
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Attachment #827560 - Flags: review?(bgirard)
Comment on attachment 827560 [details] [diff] [review]
Remove unused members of TiledLayerProperties

Review of attachment 827560 [details] [diff] [review]:
-----------------------------------------------------------------

r+ but this doesn't address the bug so keep the bug open.
Attachment #827560 - Flags: review?(bgirard) → review+
Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/a775f0d923a6

Seems we're tracking the real problem in bug 935219 now, so I'm going to co-opt this bug to track just removing these unused properties - let me know if you think that's too messy and we can agree on something nicer :)
(In reply to Chris Lord [:cwiiis] from comment #6)
> Seems we're tracking the real problem in bug 935219 now

Bug 935219 won't affect the code in ThebesLayerComposite. I might change what mCompositionBounds is, but I don't understand any of the code in ThebesLayerComposite so I'm not going to touch it.
https://hg.mozilla.org/mozilla-central/rev/a775f0d923a6
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [leave open]
This has been fixed in various other bugs, closing.
Status: REOPENED → RESOLVED
Closed: 11 years ago10 years ago
Resolution: --- → WORKSFORME
A patch landed here, changing resolution to FIXED.
Resolution: WORKSFORME → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: