FrontBufferSyncStrategy
class FrontBufferSyncStrategy : SyncStrategy
SyncStrategy implementation that optimizes for front buffered rendering use cases. More specifically this attempts to avoid unnecessary synchronization overhead wherever possible.
This will always provide a fence if the corresponding layer transitions from an invisible to a visible state. If the layer is already visible and front buffer usage flags are support on the device, then no fence is provided. If this flag is not supported, then a fence is created to ensure contents are flushed to the single buffer.
Summary
Public constructors |
|---|
FrontBufferSyncStrategy(usageFlags: Long) |
Public functions |
|
|---|---|
open SyncFenceCompat? |
createSyncFence(eglSpec: EGLSpec)Creates a |
Public properties |
|
|---|---|
Boolean |
Tells whether the corresponding front buffer layer is visible in its current state or not. |
Public constructors
FrontBufferSyncStrategy
FrontBufferSyncStrategy(usageFlags: Long)
| Parameters | |
|---|---|
usageFlags: Long |
usage flags that describe the |
Public functions
createSyncFence
open fun createSyncFence(eglSpec: EGLSpec): SyncFenceCompat?
Creates a SyncFenceCompat based on various conditions. If the layer is changing from invisible to visible, a fence is provided. If the layer is already visible and front buffer usage flag is supported on the device, then no fence is provided. If front buffer usage is not supported, then a fence is created and destroyed to flush contents to screen.
Public properties
isVisible
var isVisible: Boolean
Tells whether the corresponding front buffer layer is visible in its current state or not. Utilize this to dictate when a SyncFenceCompat will be created when using createSyncFence.