Closed Bug 1132895 Opened 9 years ago Closed 1 year ago

RefLayers don't propagate ContainerLayer attributes during a transaction

Categories

(Core :: Graphics: Layers, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: kats, Unassigned)

References

Details

(Whiteboard: gfx-noted)

When a layer transaction happens, layer properties are serialized, sent over IPC, and deserialized on the other end. Two sets of layer properties are sent over IPC, the "common" layer attributes [1] and the "specific" layer attributes [2]. The "specific" layer attributes are specific to the subclass of Layer being sent, so for example ContainerLayer has a ContainerLayerAttributes and RefLayer has a RefLayerAttributes. However, RefLayer extends from ContainerLayer, and one would expect that therefore RefLayers would also send over the ContainerLayerAttributes. However, this doesn't happen, because the RefLayerAttributes is distinct from the ContainerLayerAttributes. Therefore, if somebody sets a "container layer" property (e.g. pre-scale) on a RefLayer, it will never make it over to the compositor side. This is either a bug or a footgun - when I added a field to ContainerLayerAttributes at [3], it never occurred to me that RefLayers would *not* propagate that field.

[1] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/ipc/ShadowLayers.cpp?rev=20729b28eb1e#610
[2] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/ipc/ShadowLayers.cpp?rev=20729b28eb1e#653
[3] https://hg.mozilla.org/mozilla-central/rev/d0a1dd3fbf76
Whiteboard: gfx-noted
Perhaps we should assert for now that these properties are not changed for a RefLayer. That would remove the footgun for now and also let us know if something in the tree today is hitting the footgun. I'd hope the answer is that nothing in the tree is hitting this but it would be nice to confirm.

IMO we should either remote all or none of the attribute. Since we already do 'some' then let's do all.
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.