Flutter Engine
The Flutter Engine
Protected Member Functions | List of all members
flutter_runner::testing::FlatlandConnectionTest Class Reference
Inheritance diagram for flutter_runner::testing::FlatlandConnectionTest:

Protected Member Functions

 FlatlandConnectionTest ()
 
 ~FlatlandConnectionTest () override=default
 
async::TestLoop & loop ()
 
async_dispatcher_t * subloop_dispatcher ()
 
FakeFlatlandfake_flatland ()
 
fidl::InterfaceHandle< fuchsia::ui::composition::Flatland > TakeFlatlandHandle ()
 
void OnNextFrameBegin (int num_present_credits, const fml::TimePoint &presentation_time_1, const fml::TimePoint &presentation_time_2)
 
void OnNextFrameBegin (int num_present_credits)
 

Detailed Description

Definition at line 72 of file flatland_connection_unittests.cc.

Constructor & Destructor Documentation

◆ FlatlandConnectionTest()

flutter_runner::testing::FlatlandConnectionTest::FlatlandConnectionTest ( )
inlineprotected

Definition at line 74 of file flatland_connection_unittests.cc.

75 : session_subloop_(loop_.StartNewLoop()),
76 flatland_handle_(
77 fake_flatland_.ConnectFlatland(session_subloop_->dispatcher())) {}
fuchsia::ui::composition::FlatlandHandle ConnectFlatland(async_dispatcher_t *dispatcher=nullptr)

◆ ~FlatlandConnectionTest()

flutter_runner::testing::FlatlandConnectionTest::~FlatlandConnectionTest ( )
overrideprotecteddefault

Member Function Documentation

◆ fake_flatland()

FakeFlatland & flutter_runner::testing::FlatlandConnectionTest::fake_flatland ( )
inlineprotected

Definition at line 86 of file flatland_connection_unittests.cc.

86{ return fake_flatland_; }

◆ loop()

async::TestLoop & flutter_runner::testing::FlatlandConnectionTest::loop ( )
inlineprotected

Definition at line 80 of file flatland_connection_unittests.cc.

80{ return loop_; }

◆ OnNextFrameBegin() [1/2]

void flutter_runner::testing::FlatlandConnectionTest::OnNextFrameBegin ( int  num_present_credits)
inlineprotected

Definition at line 107 of file flatland_connection_unittests.cc.

107 {
108 const auto now = fml::TimePoint::Now();
109 const auto kPresentationTime1 = now + fml::TimeDelta::FromSeconds(100);
110 const auto kPresentationTime2 = now + fml::TimeDelta::FromSeconds(200);
111 OnNextFrameBegin(num_present_credits, kPresentationTime1,
112 kPresentationTime2);
113 }
void OnNextFrameBegin(int num_present_credits, const fml::TimePoint &presentation_time_1, const fml::TimePoint &presentation_time_2)
static constexpr TimeDelta FromSeconds(int64_t seconds)
Definition: time_delta.h:49
static TimePoint Now()
Definition: time_point.cc:49

◆ OnNextFrameBegin() [2/2]

void flutter_runner::testing::FlatlandConnectionTest::OnNextFrameBegin ( int  num_present_credits,
const fml::TimePoint presentation_time_1,
const fml::TimePoint presentation_time_2 
)
inlineprotected

Definition at line 95 of file flatland_connection_unittests.cc.

97 {
98 fuchsia::ui::composition::OnNextFrameBeginValues on_next_frame_begin_values;
99 on_next_frame_begin_values.set_additional_present_credits(
100 num_present_credits);
101 on_next_frame_begin_values.set_future_presentation_infos(
102 CreateFuturePresentationInfos(presentation_time_1,
103 presentation_time_2));
105 std::move(on_next_frame_begin_values));
106 }
void FireOnNextFrameBeginEvent(fuchsia::ui::composition::OnNextFrameBeginValues on_next_frame_begin_values)

◆ subloop_dispatcher()

async_dispatcher_t * flutter_runner::testing::FlatlandConnectionTest::subloop_dispatcher ( )
inlineprotected

Definition at line 82 of file flatland_connection_unittests.cc.

82 {
83 return session_subloop_->dispatcher();
84 }

◆ TakeFlatlandHandle()

fidl::InterfaceHandle< fuchsia::ui::composition::Flatland > flutter_runner::testing::FlatlandConnectionTest::TakeFlatlandHandle ( )
inlineprotected

Definition at line 89 of file flatland_connection_unittests.cc.

89 {
90 FML_CHECK(flatland_handle_.is_valid());
91 return std::move(flatland_handle_);
92 }
#define FML_CHECK(condition)
Definition: logging.h:85

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