Closed Bug 1042536 Opened 10 years ago Closed 9 years ago

Enable ImageLayer optimization for clipped backgrounds

Categories

(Core :: Layout, defect)

29 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached patch image-layerizeSplinter Review
Now that we clip background images using DisplayItemClip (bug 1042423), we can optimize more images into ImageLayers.

https://tbpl.mozilla.org/?tree=Try&rev=f2427af4e3c6
Attachment #8460770 - Flags: review?(roc)
With this patch, does this testcase correctly show solid white squares with black borders? (You'll need to enable layout.css.will-change.enabled to get an image layer in the bottom square.)

We talked about this optimization in Taipei and the subimage sampling requirement was what put me off doing this sooner. jrmuizel suggested adding a sampling rect property to ImageLayers and using a shader that clamps the texture sample positions to this rect.
Yes, becaause we still don't get an ImageLayer for this case. We patch should only let us have an ImageLayer when the destination is clipped, not when we need source clipping for the image.
Oh because you're not removing the "if (!state.mDestArea.IsEqualEdges(state.mFillArea)) {" further down in the function. Good, I missed that.
Comment on attachment 8460770 [details] [diff] [review]
image-layerize

Can I steal this review?
Attachment #8460770 - Flags: review?(roc) → review+
Blocks: 1201333
https://hg.mozilla.org/mozilla-central/rev/e26240900b5a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: