Package: android.hardware.graphics.composer@2.1

IComposerCallback

interface IComposerCallback

Properties

Connection

enum Connection: int32_t
Details
Members
INVALID = 0
CONNECTED = 1
The display has been connected
DISCONNECTED = 2
The display has been disconnected

Methods

onHotplug

onHotplug (Display display, Connection connected)

Notifies the client that the given display has either been connected or disconnected.Every active display(even a built-in physical display)must trigger at least one hotplug notification, even if it only occurs immediately after callback registration.

Displays which have been connected are assumed to be in PowerMode::OFF, and the onVsync callback should not be called for a display until vsync has been enabled with setVsyncEnabled.

The client may call back into the device while the callback is in progress.The device must serialize calls to this callback such that only one thread is calling it at a time.

Details
Parameters
display
is the display that triggers the hotplug event.
connected
indicates whether the display is connected or disconnected.
Annotations
callflow
next="*"

onRefresh

oneway onRefresh (Display display)

Notifies the client to trigger a screen refresh.This forces all layer state for this display to be resent, and the display to be validated and presented, even if there have been no changes.

This refresh will occur some time after the callback is initiated, but not necessarily before it returns.It is safe to trigger this callback from other functions which call into the device.

Details
RPC mode
oneway
Parameters
display
is the display to refresh.
Annotations
callflow
next="*"

onVsync

oneway onVsync (Display display, int64_t timestamp)

Notifies the client that a vsync event has occurred.This callback must only be triggered when vsync is enabled for this display(through setVsyncEnabled).

Details
RPC mode
oneway
Parameters
display
is the display which has received a vsync event
timestamp
is the CLOCK_MONOTONIC time at which the vsync event occurred, in nanoseconds.
Annotations
callflow
next="*"