7 #include "flutter/fml/message_loop.h"
13 return tChoreographer;
16 Choreographer::Choreographer() {
23 fml::MessageLoop::EnsureInitializedForCurrentThread();
47 auto data = std::make_unique<InFlightData>();
48 data->callback = std::move(callback);
51 if (table.AChoreographer_postFrameCallback64) {
52 table.AChoreographer_postFrameCallback64(
53 const_cast<AChoreographer*
>(instance_),
54 [](int64_t nanos,
void* p_data) {
55 auto data =
reinterpret_cast<InFlightData*
>(p_data);
61 }
else if (table.AChoreographer_postFrameCallback) {
62 table.AChoreographer_postFrameCallback(
63 const_cast<AChoreographer*
>(instance_),
64 [](
long nanos,
void* p_data) {
65 auto data =
reinterpret_cast<InFlightData*
>(p_data);
This class describes access to the choreographer instance for the current thread. Choreographers are ...
std::chrono::time_point< FrameClock > FrameTimePoint
std::function< void(FrameTimePoint)> FrameCallback
bool PostFrameCallback(FrameCallback callback) const
Posts a frame callback. The time that the frame is being rendered will be available in the callback a...
static bool IsAvailableOnPlatform()
static Choreographer & GetInstance()
Create or get the thread local instance of a choreographer. A message loop will be setup on the calli...
const ProcTable & GetProcTable()
static Choreographer::FrameTimePoint ClockMonotonicNanosToFrameTimePoint(int64_t p_nanos)
std::shared_ptr< const fml::Mapping > data