Platform/GFX/Surfaces/Use cases: Difference between revisions
Jump to navigation
Jump to search
m (→WebGL) |
(→WebGL) |
||
Line 3: | Line 3: | ||
== WebGL == | == WebGL == | ||
'''Production: | '''Production by Content:''' | ||
* (Producible in workers) | * (Producible in workers) | ||
* (Backbuffer is allocated lazily on any draw/read/query of the backbuffer) | * (Backbuffer is allocated lazily on any draw/read/query of the backbuffer) | ||
Line 11: | Line 10: | ||
* 'Present' events cause us to detach the backbuffer frame, create a Fence, and submit it towards the consumer. | * 'Present' events cause us to detach the backbuffer frame, create a Fence, and submit it towards the consumer. | ||
'''Consumption: | '''Consumption in Compositor:''' | ||
* Request the most recently submitted frame (from the producer), and Wait on the Fence to establish frame completeness. | * Request the most recently submitted frame (from the producer), and Wait on the Fence to establish frame completeness. | ||
* (Ability to, instead: Request the most-recently-complete frame, likely polling for frame completion) | * (Ability to, instead: Request the most-recently-complete frame, likely polling for frame completion) | ||
Line 19: | Line 17: | ||
* Frame is considered read-only. | * Frame is considered read-only. | ||
* Avoid unnecessary readbacks and uploads. | * Avoid unnecessary readbacks and uploads. | ||
* Consumed frame persists until overridden by a newer frame. (WebGL can stop producing at any time) | |||
'''Consumption in Content:''' | |||
* (Ability to readback the current frontbuffer? (Can be slow)) |
Latest revision as of 02:07, 9 January 2014
Use cases for surfaces in Gecko. (Parenthetical list items are optional, but future-looking)
WebGL
Production by Content:
- (Producible in workers)
- (Backbuffer is allocated lazily on any draw/read/query of the backbuffer)
- (Wait on Fence that prevents early writes to an in-use buffer)
- Backbuffer is read/writeable at any time during JS execution.
- 'Present' events cause us to detach the backbuffer frame, create a Fence, and submit it towards the consumer.
Consumption in Compositor:
- Request the most recently submitted frame (from the producer), and Wait on the Fence to establish frame completeness.
- (Ability to, instead: Request the most-recently-complete frame, likely polling for frame completion)
- If new frame retrieved, recycle old frame.
- (Fence before recycle, so we're sure we're done reading before we begin writing)
- Frame is considered read-only.
- Avoid unnecessary readbacks and uploads.
- Consumed frame persists until overridden by a newer frame. (WebGL can stop producing at any time)
Consumption in Content:
- (Ability to readback the current frontbuffer? (Can be slow))