Flutter Engine
The Flutter Engine
|
This class describes access to the choreographer instance for the current thread. Choreographers are only available on API levels above 24. On levels below 24, an invalid choreographer will be returned. More...
#include <choreographer.h>
Public Types | |
using | FrameClock = std::chrono::steady_clock |
using | FrameTimePoint = std::chrono::time_point< FrameClock > |
using | FrameCallback = std::function< void(FrameTimePoint)> |
Public Member Functions | |
~Choreographer () | |
Choreographer (const Choreographer &)=delete | |
Choreographer & | operator= (const Choreographer &)=delete |
bool | IsValid () const |
bool | PostFrameCallback (FrameCallback callback) const |
Posts a frame callback. The time that the frame is being rendered will be available in the callback as an argument. Multiple frame callbacks within the same frame interval will receive the same argument. More... | |
Static Public Member Functions | |
static bool | IsAvailableOnPlatform () |
static Choreographer & | GetInstance () |
Create or get the thread local instance of a choreographer. A message loop will be setup on the calling thread if none exists. More... | |
This class describes access to the choreographer instance for the current thread. Choreographers are only available on API levels above 24. On levels below 24, an invalid choreographer will be returned.
Since choreographer need an event loop on the current thread, one will be setup if it doesn't already exist.
Definition at line 24 of file choreographer.h.
Definition at line 60 of file choreographer.h.
using impeller::android::Choreographer::FrameClock = std::chrono::steady_clock |
A monotonic system clock.
Definition at line 54 of file choreographer.h.
using impeller::android::Choreographer::FrameTimePoint = std::chrono::time_point<FrameClock> |
A timepoint on a monotonic system clock.
Definition at line 59 of file choreographer.h.
|
default |
|
delete |
|
static |
Create or get the thread local instance of a choreographer. A message loop will be setup on the calling thread if none exists.
IsAvailableOnPlatform
call.IsValid
. Definition at line 11 of file choreographer.cc.
|
static |
Definition at line 78 of file choreographer.cc.
bool impeller::android::Choreographer::IsValid | ( | ) | const |
Definition at line 29 of file choreographer.cc.
|
delete |
bool impeller::android::Choreographer::PostFrameCallback | ( | FrameCallback | callback | ) | const |
Posts a frame callback. The time that the frame is being rendered will be available in the callback as an argument. Multiple frame callbacks within the same frame interval will receive the same argument.
[in] | callback | The callback |
true
if the frame callback could be posted. This may return false
if choreographers are not available on the platform. See IsAvailableOnPlatform
. Definition at line 38 of file choreographer.cc.