Platform/GFX/Surfaces/Use cases: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Use cases for surfaces in Gecko. (Parenthetical list items are optional, but future-looking) == WebGL == '''Production: (WebGL content code)''' * (Producible in workers) * (...") |
m (→WebGL) |
||
Line 13: | Line 13: | ||
'''Consumption: (compositor)''' | '''Consumption: (compositor)''' | ||
* Request the most recently submitted frame, 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) | ||
* If new frame retrieved, recycle old frame. | * If new frame retrieved, recycle old frame. |
Revision as of 01:52, 9 January 2014
Use cases for surfaces in Gecko. (Parenthetical list items are optional, but future-looking)
WebGL
Production: (WebGL content code)
- (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: (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.