Closed Bug 1228952 Opened 4 years ago Closed 4 years ago

Don't put metadata in BufferTextureClient/Host buffers

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: nical, Assigned: nical)

Details

Attachments

(1 file)

There was already a bug filed for this but I can't find it. Shmem allocations are multiples of page sizes and with tiling we often would fit exactly a multiple of the page size if it was not for the metadata in the header that causes us allocate an extra page worth of shared memory every time.
Instead of having this header in the buffer (for size, format, etc), we could just place it in the surface descriptor.
instead of being at the beginning of the buffer the info is stored in a regular IPDL-generated descriptor that the TextureClient and TextureHost hold on to. I didn't forsee the patch becoming this big, but turns out we were using (YCbCr)ImageDataSerializer all over the place and the later mostly made sense the way things worked before the patch and got slimmed down quite a bit. I'd like to go further and make ImageDataSerializer disappear to become an implementation detail of BufferTextureClient/Host, but that'll go into followup work.
Attachment #8699451 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8699451 [details] [diff] [review]
Move the metadata out of the buffer.

Nice! Looks good.
Attachment #8699451 - Flags: review?(sotaro.ikeda.g) → review+
https://hg.mozilla.org/mozilla-central/rev/38e25a00e96b
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.