addPersistentFrameCallback method

void addPersistentFrameCallback (FrameCallback callback)

Adds a persistent frame callback.

Persistent callbacks are called after transient (non-persistent) frame callbacks.

Does not request a new frame. Conceptually, persistent frame callbacks are observers of "begin frame" events. Since they are executed after the transient frame callbacks they can drive the rendering pipeline.

Persistent frame callbacks cannot be unregistered. Once registered, they are called for every frame for the lifetime of the application.

Implementation

void addPersistentFrameCallback(FrameCallback callback) {
  _persistentCallbacks.add(callback);
}