Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
flutter::testing::ConstantFiringVsyncWaiter Class Reference

#include <vsync_waiters_test.h>

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

Public Member Functions

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

Static Public Attributes

static constexpr fml::TimePoint kFrameBeginTime
 
static constexpr fml::TimePoint kFrameTargetTime
 

Protected Member Functions

void AwaitVSync () override
 
- Protected Member Functions inherited from flutter::VsyncWaiter
 VsyncWaiter (const TaskRunners &task_runners)
 
virtual void AwaitVSync ()=0
 
virtual void AwaitVSyncForSecondaryCallback ()
 
void FireCallback (fml::TimePoint frame_start_time, fml::TimePoint frame_target_time, bool pause_secondary_tasks=true)
 

Additional Inherited Members

- Public Types inherited from flutter::VsyncWaiter
using Callback = std::function< void(std::unique_ptr< FrameTimingsRecorder >)>
 
- Protected Attributes inherited from flutter::VsyncWaiter
const TaskRunners task_runners_
 

Detailed Description

Definition at line 46 of file vsync_waiters_test.h.

Constructor & Destructor Documentation

◆ ConstantFiringVsyncWaiter()

flutter::testing::ConstantFiringVsyncWaiter::ConstantFiringVsyncWaiter ( const TaskRunners task_runners)
inlineexplicit

Definition at line 54 of file vsync_waiters_test.h.

55 : VsyncWaiter(task_runners) {}
VsyncWaiter(const TaskRunners &task_runners)
Definition: vsync_waiter.cc:21

Member Function Documentation

◆ AwaitVSync()

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

Implements flutter::VsyncWaiter.

Definition at line 59 of file vsync_waiters_test.cc.

59 {
61 auto async_wait = std::async([this]() {
64 });
65}
fml::RefPtr< fml::TaskRunner > GetUITaskRunner() const
Definition: task_runners.cc:34
fml::RefPtr< fml::TaskRunner > GetPlatformTaskRunner() const
Definition: task_runners.cc:30
void FireCallback(fml::TimePoint frame_start_time, fml::TimePoint frame_target_time, bool pause_secondary_tasks=true)
Definition: vsync_waiter.cc:87
const TaskRunners task_runners_
Definition: vsync_waiter.h:44
static constexpr fml::TimePoint kFrameTargetTime
static constexpr fml::TimePoint kFrameBeginTime
virtual bool RunsTasksOnCurrentThread()
Definition: task_runner.cc:43
#define FML_DCHECK(condition)
Definition: logging.h:103

Member Data Documentation

◆ kFrameBeginTime

constexpr fml::TimePoint flutter::testing::ConstantFiringVsyncWaiter::kFrameBeginTime
staticconstexpr
Initial value:
=
static constexpr TimeDelta FromSeconds(int64_t seconds)
Definition: time_delta.h:49
static constexpr TimePoint FromEpochDelta(TimeDelta ticks)
Definition: time_point.h:43

Definition at line 49 of file vsync_waiters_test.h.

◆ kFrameTargetTime

constexpr fml::TimePoint flutter::testing::ConstantFiringVsyncWaiter::kFrameTargetTime
staticconstexpr
Initial value:

Definition at line 51 of file vsync_waiters_test.h.


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