Closed Bug 947062 Opened 11 years ago Closed 9 years ago

Layerize animated background-position

Categories

(Core :: Graphics: Layers, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed
b2g-v2.5 --- fixed

People

(Reporter: BenWa, Assigned: mstange)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files)

Testcase: http://787.aircanada.com/en?mpch=ads

We scroll the page at 6 FPS on retina. We should layerize background-position. Even if the element isn't moving, it can be represented by a display item that is moving and thus we should be able to generate a layer that stays in place by modifying the valid region + transform to force the layer to rotate the contents without moving or repainting the whole thing.
Attached file testcase (deleted) —
Attached file testcase2 - elem doesn't move (deleted) —
Summary: Layerize background-position → Layerize animated background-position
We can make the nsDisplayBackgroundImage create an ImageLayer if the frame's LayerActivity tells us that the background-position property is animated.
Blocks: 1201336
Here's another example:
https://www.reddit.com/r/kerbalspaceprogram/

Currently the theme for this subreddit is a circular clip with an animated ground/cloud layer. With mask layers and animated background position we should be able to layerize this animation.
Bug 947062 - Make background-position inline-style changes and CSS animations trigger layer activity. r?roc
Attachment #8679496 - Flags: review?(roc)
Bug 947062 - Refactor nsDisplayBackgroundImage::GetLayerState. r?mattwoodrow
Attachment #8679497 - Flags: review?(matt.woodrow)
Bug 947062 - Layerize background images with animated background-position if possible. r?mattwoodrow
Attachment #8679498 - Flags: review?(matt.woodrow)
The examples in this bug won't layerize until we support ImageLayers for clipped and repeated images, but these patches lay the groundwork.
Assignee: nobody → mstange
Comment on attachment 8679497 [details]
MozReview Request: Bug 947062 - Refactor nsDisplayBackgroundImage::GetLayerState. r?mattwoodrow

https://reviewboard.mozilla.org/r/23437/#review20939

::: layout/base/nsDisplayList.cpp:2522
(Diff revision 1)
> + 

Trailing whitespace!
Attachment #8679497 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8679498 [details]
MozReview Request: Bug 947062 - Layerize background images with animated background-position if possible. r?mattwoodrow

https://reviewboard.mozilla.org/r/23439/#review20941
Attachment #8679498 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8679496 [details]
MozReview Request: Bug 947062 - Make background-position inline-style changes and CSS animations trigger layer activity. r?roc

https://reviewboard.mozilla.org/r/23435/#review20969
Attachment #8679496 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbb83e48dbcef91b0efbcde557c9a4317b82da74
Bug 947062 - Make background-position inline-style changes and CSS animations trigger layer activity. r=roc

https://hg.mozilla.org/integration/mozilla-inbound/rev/d9da665e6f0dd1713e9e80c51edd54ca17998677
Bug 947062 - Refactor nsDisplayBackgroundImage::GetLayerState. r=mattwoodrow

https://hg.mozilla.org/integration/mozilla-inbound/rev/7e3476b5b99d8b18500ef3b6f41f6a0e9a915d99
Bug 947062 - Layerize background images with animated background-position if possible. r=mattwoodrow
Blocks: 1235566
Depends on: 1251382
No longer depends on: 1251382
Depends on: 1251382
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: