Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::DepthExpector Class Reference
Inheritance diagram for flutter::testing::DepthExpector:
flutter::DlOpReceiver flutter::IgnoreAttributeDispatchHelper flutter::IgnoreTransformDispatchHelper flutter::IgnoreClipDispatchHelper flutter::IgnoreDrawDispatchHelper

Public Member Functions

 DepthExpector (std::vector< uint32_t > expectations)
 
void save () override
 
void save (uint32_t total_content_depth) override
 
void saveLayer (const DlRect &bounds, SaveLayerOptions options, const DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
 
void saveLayer (const DlRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, DlBlendMode max_content_mode, const DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
 
bool all_depths_checked () const
 
- Public Member Functions inherited from flutter::DlOpReceiver
virtual void saveLayer (const DlRect *bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr, std::optional< int64_t > backdrop_id=std::nullopt) final
 

Additional Inherited Members

- Static Public Attributes inherited from flutter::DlOpReceiver
static constexpr int kMaxDrawPointsCount = ((1 << 29) - 1)
 

Detailed Description

Definition at line 4113 of file display_list_unittests.cc.

Constructor & Destructor Documentation

◆ DepthExpector()

flutter::testing::DepthExpector::DepthExpector ( std::vector< uint32_t >  expectations)
inlineexplicit

Definition at line 4119 of file display_list_unittests.cc.

4120 : depth_expectations_(std::move(expectations)) {}

Member Function Documentation

◆ all_depths_checked()

bool flutter::testing::DepthExpector::all_depths_checked ( ) const
inline

Definition at line 4156 of file display_list_unittests.cc.

4156 {
4157 return index_ == depth_expectations_.size();
4158 }

◆ save() [1/2]

void flutter::testing::DepthExpector::save ( )
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 4122 of file display_list_unittests.cc.

4122 {
4123 // This method should not be called since we override the variant with
4124 // the total_content_depth parameter.
4125 FAIL() << "save(no depth parameter) method should not be called";
4126 }

◆ save() [2/2]

void flutter::testing::DepthExpector::save ( uint32_t  total_content_depth)
inlineoverridevirtual

Reimplemented from flutter::DlOpReceiver.

Definition at line 4128 of file display_list_unittests.cc.

4128 {
4129 ASSERT_LT(index_, depth_expectations_.size());
4130 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
4131 << "at index " << index_;
4132 index_++;
4133 }

◆ saveLayer() [1/2]

void flutter::testing::DepthExpector::saveLayer ( const DlRect bounds,
const SaveLayerOptions options,
uint32_t  total_content_depth,
DlBlendMode  max_content_mode,
const DlImageFilter backdrop,
std::optional< int64_t >  backdrop_id 
)
inlineoverridevirtual

Reimplemented from flutter::DlOpReceiver.

Definition at line 4144 of file display_list_unittests.cc.

4149 {
4150 ASSERT_LT(index_, depth_expectations_.size());
4151 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
4152 << "at index " << index_;
4153 index_++;
4154 }

◆ saveLayer() [2/2]

void flutter::testing::DepthExpector::saveLayer ( const DlRect bounds,
SaveLayerOptions  options,
const DlImageFilter backdrop,
std::optional< int64_t >  backdrop_id 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 4135 of file display_list_unittests.cc.

4138 {
4139 // This method should not be called since we override the variant with
4140 // the total_content_depth parameter.
4141 FAIL() << "saveLayer(no depth parameter) method should not be called";
4142 }

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