Methods Summary |
---|
private void | dispatchHotplug(long timestampNanos, int builtInDisplayId, boolean connected)
onHotplug(timestampNanos, builtInDisplayId, connected);
|
private void | dispatchVsync(long timestampNanos, int builtInDisplayId, int frame)
onVsync(timestampNanos, builtInDisplayId, frame);
|
public void | dispose()Disposes the receiver.
dispose(false);
|
private void | dispose(boolean finalized)
if (mCloseGuard != null) {
if (finalized) {
mCloseGuard.warnIfOpen();
}
mCloseGuard.close();
}
if (mReceiverPtr != 0) {
nativeDispose(mReceiverPtr);
mReceiverPtr = 0;
}
mMessageQueue = null;
|
protected void | finalize()
try {
dispose(true);
} finally {
super.finalize();
}
|
private static native void | nativeDispose(long receiverPtr)
|
private static native long | nativeInit(android.view.DisplayEventReceiver receiver, android.os.MessageQueue messageQueue)
|
private static native void | nativeScheduleVsync(long receiverPtr)
|
public void | onHotplug(long timestampNanos, int builtInDisplayId, boolean connected)Called when a display hotplug event is received.
|
public void | onVsync(long timestampNanos, int builtInDisplayId, int frame)Called when a vertical sync pulse is received.
The recipient should render a frame and then call {@link #scheduleVsync}
to schedule the next vertical sync pulse.
|
public void | scheduleVsync()Schedules a single vertical sync pulse to be delivered when the next
display frame begins.
if (mReceiverPtr == 0) {
Log.w(TAG, "Attempted to schedule a vertical sync pulse but the display event "
+ "receiver has already been disposed.");
} else {
nativeScheduleVsync(mReceiverPtr);
}
|