-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
Compare https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_buffer_age.txt:
For example, with a double buffered surface and an
implementation that swaps via buffer exchanges, the age would
usually be 2. With a triple buffered surface the age would
usually be 3. An age of 1 means the previous swap was
implemented as a copy. An age of 0 means the buffer has only
just been initialized and the contents are undefined. Single
buffered surfaces have no frame boundaries and therefore
always have an age of 0.
We can have a method on softbuffer::Surface, something like fn age(&self) -> Option<NonZeroU8>. An application rendering with softbuffer could use this to avoid redrawing everything every frame when not much has changed, regardless of whether a backend uses double-buffering, etc.
Currently buffer_mut is documented saying "The initial contents of the buffer may be zeroed, or may contain a previous frame." So this would provide a way to know which previous frame.
Metadata
Metadata
Assignees
Labels
No labels