Open Bug 615734 Opened 14 years ago Updated 2 years ago

Store clip explicitly in each nsDisplayItem

Categories

(Core :: Layout, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: roc, Unassigned)

References

Details

nsDisplayClip is a pain. We can simplify our code and probably improve performance (see bug 579260) by storing clip objects on each nsDisplayItem which contain the complete clip for that display item. We already do this in FrameLayerBuilder when we paint, so we should just move that earlier in the pipeline. We can keep this simple and minimize space overhead by keeping a stack of clip objects in the nsDisplayListBuilder. When we push a new clip object, the clip object would be allocated in the display list arena, so each nsDisplayItem* only needs a pointer to the clip object. We can set up the clip objects in the ComputeVisibility pass. So we'll still have nsDisplayClip during display list construction, to set up clipping, but during ComputeVisibilty they will all be eliminated.
Actually we should avoid constructing nsDisplayClip(RoundedRect) items completely by just updating the clip on the item in the implementations of WrapItem.
Assignee: roc → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.