Back to Filament

DisplayHelper

docs/android/dokka/filament-android/com.google.android.filament.android/-display-helper/index.md

1.75.03.0 KB
Original Source

//filament-android/com.google.android.filament.android/DisplayHelper

DisplayHelper

[main]
open class DisplayHelper

DisplayHelper is here to help managing a Display, for instance being notified when its resolution or refresh rate changes.

Constructors

DisplayHelper[main]
constructor(context: Context)
Creates a DisplayHelper which helps managing a Display.
constructor(context: Context, handler: Handler)
Creates a DisplayHelper which helps manage a Display and provides a Handler where callbacks can execute filament code.

Functions

NameSummary
attach[main]
open fun attach(renderer: Renderer, display: Display)
Sets the filament Renderer associated to the Display, from this point on, Renderer.DisplayInfo will be automatically updated when the Display properties change.
detach[main]
open fun detach()
Disconnect the previously set Renderer from Display This is typically called from onDetachedFromSurface.
getAppVsyncOffsetNanos[main]
open fun getAppVsyncOffsetNanos(display: Display): Long
getDisplay[main]
open fun getDisplay(): Display
Returns the Display currently monitored
getDisplayInfo[main]
open fun getDisplayInfo(display: Display, info: Renderer.DisplayInfo): Renderer.DisplayInfo
Populate a Renderer.DisplayInfo with properties from the given Display
getPresentationDeadlineNanos[main]
open fun getPresentationDeadlineNanos(display: Display): Long
getRefreshPeriodNanos[main]
open fun getRefreshPeriodNanos(display: Display): Long
Returns a Display's refresh period in nanoseconds
getRefreshRate[main]
open fun getRefreshRate(display: Display): Float