Closed
Bug 913438
Opened 11 years ago
Closed 11 years ago
Disable mAnchor check in nsDisplayBackgroundImage::TryOptimizeImageLayer
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: roc, Assigned: roc)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #800750 -
Flags: review?(tnikkel)
Updated•11 years ago
|
Attachment #800750 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 2•11 years ago
|
||
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.
Description
•