Flutter Engine
 
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 4103 of file display_list_unittests.cc.

Constructor & Destructor Documentation

◆ DepthExpector()

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

Definition at line 4109 of file display_list_unittests.cc.

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

Member Function Documentation

◆ all_depths_checked()

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

Definition at line 4146 of file display_list_unittests.cc.

4146 {
4147 return index_ == depth_expectations_.size();
4148 }

◆ save() [1/2]

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

Implements flutter::DlOpReceiver.

Definition at line 4112 of file display_list_unittests.cc.

4112 {
4113 // This method should not be called since we override the variant with
4114 // the total_content_depth parameter.
4115 FAIL() << "save(no depth parameter) method should not be called";
4116 }

◆ save() [2/2]

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

Reimplemented from flutter::DlOpReceiver.

Definition at line 4118 of file display_list_unittests.cc.

4118 {
4119 ASSERT_LT(index_, depth_expectations_.size());
4120 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
4121 << "at index " << index_;
4122 index_++;
4123 }

◆ 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 4134 of file display_list_unittests.cc.

4139 {
4140 ASSERT_LT(index_, depth_expectations_.size());
4141 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
4142 << "at index " << index_;
4143 index_++;
4144 }

◆ 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 4125 of file display_list_unittests.cc.

4128 {
4129 // This method should not be called since we override the variant with
4130 // the total_content_depth parameter.
4131 FAIL() << "saveLayer(no depth parameter) method should not be called";
4132 }

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