Open Bug 585399 Opened 14 years ago Updated 2 years ago

Background could be retained but does not appear to be

Categories

(Core :: Layout, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: bas.schouten, Unassigned)

References

()

Details

I was testing accelerated CSS transforms with the D3D9 layer manager. I was visiting the above site created by Paul, which seemed to offer a lovely oppurtunity.

Although the site was faster than with the basic layer manager it wasn't quite as fast as I expected it to be. I did an xperf profiling run on the site while moving the images around and noticed more than half of the CPU time was spent in pixman related stuff, a lot of it radial gradient filling. It appears that the layer containing the background (the blue radial gradient), is recycled on each frame(and therefor gets completely invalidated), causing a full-window gradient to need to be filled on each frame. I'd argue this background (being fixed) is a great case for retention, but it does not appear to be retained.
When we invalidate ThebesLayer content, we invalidate the same area in all ThebesLayer children with the same container parent ... because it's hard to tell at invalidation time which ThebesLayers need to be invalidated. This is probably what you're seeing.

We can fix that with display-list-based invalidation, but that's not going to happen for FF4.
(In reply to comment #1)
> When we invalidate ThebesLayer content, we invalidate the same area in all
> ThebesLayer children with the same container parent ... because it's hard to
> tell at invalidation time which ThebesLayers need to be invalidated. This is
> probably what you're seeing.
> 
> We can fix that with display-list-based invalidation, but that's not going to
> happen for FF4.

In this case the complete background layer is a victim of the recycling process though.. not a normal invalidation. Is it thusly invalidated that it decides to just recycle it?

It's a bit of a bummer since this means for most of the test cases I've played with that there's pretty much no performance advantage to hardware layers (well there's some, that URL goes from 1 fps for some animations to more like 3 or 4, but that's still not a great user experience). Where if I play around a bit with hacks to avoid silly invalidations and recyclings we get great performance.

As far as I can see this particular URL there should be pretty much no invalidation happening, right? Transformed layers move around here, but the content of the layers doesn't change as far as I can see.
(In reply to comment #2)
> In this case the complete background layer is a victim of the recycling process
> though.. not a normal invalidation. Is it thusly invalidated that it decides to
> just recycle it?

I'm not sure what you mean. Recycling is generally a good thing. If a layer is not recycled, it must be recreated, and obviously then it has to be repainted.

But yeah, maybe there's another bug here.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.