Flutter Engine
flutter::testing::ConstantFiringVsyncWaiter Class Reference

#include <vsync_waiters_test.h>

Inheritance diagram for flutter::testing::ConstantFiringVsyncWaiter:
flutter::VsyncWaiter

Public Member Functions

 ConstantFiringVsyncWaiter (TaskRunners task_runners)
 
- Public Member Functions inherited from flutter::VsyncWaiter
virtual ~VsyncWaiter ()
 
void AsyncWaitForVsync (const Callback &callback)
 
void ScheduleSecondaryCallback (const fml::closure &callback)
 

Static Public Attributes

static constexpr fml::TimePoint frame_begin_time
 
static constexpr fml::TimePoint frame_target_time
 

Protected Member Functions

void AwaitVSync () override
 
- Protected Member Functions inherited from flutter::VsyncWaiter
 VsyncWaiter (TaskRunners task_runners)
 
void FireCallback (fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)
 

Additional Inherited Members

- Public Types inherited from flutter::VsyncWaiter
using Callback = std::function< void(fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)>
 
- Protected Attributes inherited from flutter::VsyncWaiter
const TaskRunners task_runners_
 

Detailed Description

Definition at line 44 of file vsync_waiters_test.h.

Constructor & Destructor Documentation

◆ ConstantFiringVsyncWaiter()

flutter::testing::ConstantFiringVsyncWaiter::ConstantFiringVsyncWaiter ( TaskRunners  task_runners)
inline

Definition at line 52 of file vsync_waiters_test.h.

53  : VsyncWaiter(std::move(task_runners)) {}
VsyncWaiter(TaskRunners task_runners)
Definition: vsync_waiter.cc:32

Member Function Documentation

◆ AwaitVSync()

void flutter::testing::ConstantFiringVsyncWaiter::AwaitVSync ( )
overrideprotectedvirtual

Implements flutter::VsyncWaiter.

Definition at line 59 of file vsync_waiters_test.cc.

References FML_DCHECK, and task_runners_.

59  {
61  auto async_wait = std::async([this]() {
64  });
65 }
static constexpr fml::TimePoint frame_begin_time
#define FML_DCHECK(condition)
Definition: logging.h:86
fml::RefPtr< fml::TaskRunner > GetPlatformTaskRunner() const
Definition: task_runners.cc:30
virtual void PostTask(const fml::closure &task)
Definition: task_runner.cc:24
static constexpr fml::TimePoint frame_target_time
fml::RefPtr< fml::TaskRunner > GetUITaskRunner() const
Definition: task_runners.cc:34
void FireCallback(fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)
Definition: vsync_waiter.cc:91
const TaskRunners task_runners_
Definition: vsync_waiter.h:39
virtual bool RunsTasksOnCurrentThread()
Definition: task_runner.cc:43

Member Data Documentation

◆ frame_begin_time

constexpr fml::TimePoint flutter::testing::ConstantFiringVsyncWaiter::frame_begin_time
static
Initial value:

Definition at line 47 of file vsync_waiters_test.h.

◆ frame_target_time

constexpr fml::TimePoint flutter::testing::ConstantFiringVsyncWaiter::frame_target_time
static
Initial value:

Definition at line 49 of file vsync_waiters_test.h.

Referenced by flutter::testing::TEST_F().


The documentation for this class was generated from the following files: