Closed Bug 913438 Opened 11 years ago Closed 11 years ago

Disable mAnchor check in nsDisplayBackgroundImage::TryOptimizeImageLayer

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: roc, Assigned: roc)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Layerized nsDisplayBackgroundImages don't follow the same rules for image snapping as our regular image drawing path ... unfortunately. Regular image drawing always preserves scale factors exactly and snaps a particular "anchor point" to the corner of a pixel. This is especially important when drawing tiled images, where changing scale factors in any way could grossly change the number of tiles that appear in a given region (since any change in tile size is multiplied by the number of tiles). Layerized nsDisplayBackgroundImages currently don't support tiling. Snapping occurs in ImageLayer::ComputeEffectiveTransforms, which snaps the image rect edges to nearest pixel boundaries, possibly changing scale factors. The anchor point is unused. We try to avoid problems by refusing layerization if the anchor point is not (0,0) (the top left of the image), but this doesn't really make sense since layerized image snapping is just different and the anchor point is not relevant. Inconsistency between layerized image drawing and regular image drawing could be problematic but it doesn't seem to have shown up so far. In the meantime we should just remove the anchor check since it can hurt performance and probably isn't helping anything.
Attached patch fix (deleted) — Splinter Review
Attachment #800750 - Flags: review?(tnikkel)
Attachment #800750 - Flags: review?(tnikkel) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: