5#include "flutter/shell/platform/embedder/vsync_waiter_embedder.h"
12 :
VsyncWaiter(task_runners), vsync_callback_(vsync_callback) {
19void VsyncWaiterEmbedder::AwaitVSync() {
20 auto* weak_waiter =
new std::weak_ptr<VsyncWaiter>(shared_from_this());
21 intptr_t baton =
reinterpret_cast<intptr_t
>(weak_waiter);
22 vsync_callback_(baton);
39 [frame_start_time, frame_target_time, baton]() {
40 std::weak_ptr<VsyncWaiter>* weak_waiter =
41 reinterpret_cast<std::weak_ptr<VsyncWaiter>*
>(baton);
42 auto vsync_waiter = weak_waiter->lock();
45 vsync_waiter->FireCallback(frame_start_time, frame_target_time);
fml::RefPtr< fml::TaskRunner > GetUITaskRunner() const
static bool OnEmbedderVsync(const flutter::TaskRunners &task_runners, intptr_t baton, fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)
~VsyncWaiterEmbedder() override
std::function< void(intptr_t)> VsyncCallback
friend class VsyncWaiterEmbedder
virtual void PostTaskForTime(const fml::closure &task, fml::TimePoint target_time)
#define FML_DCHECK(condition)