Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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 SkRect &bounds, SaveLayerOptions options, const DlImageFilter *backdrop) override
 
void saveLayer (const SkRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, const DlImageFilter *backdrop) override
 
- Public Member Functions inherited from flutter::DlOpReceiver
virtual bool PrefersImpellerPaths () const
 
virtual void clipPath (const CacheablePath &cache, ClipOp clip_op, bool is_aa)
 
virtual void drawPath (const CacheablePath &cache)
 
virtual void drawShadow (const CacheablePath &cache, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr)
 
virtual void saveLayer (const SkRect *bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr) final
 

Additional Inherited Members

- Static Public Attributes inherited from flutter::DlOpReceiver
static constexpr int kMaxDrawPointsCount = ((1 << 29) - 1)
 
- Protected Types inherited from flutter::DlOpReceiver
using ClipOp = DlCanvas::ClipOp
 
using PointMode = DlCanvas::PointMode
 
using SrcRectConstraint = DlCanvas::SrcRectConstraint
 

Detailed Description

Definition at line 3806 of file display_list_unittests.cc.

Constructor & Destructor Documentation

◆ DepthExpector()

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

Definition at line 3812 of file display_list_unittests.cc.

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

Member Function Documentation

◆ save() [1/2]

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

Implements flutter::DlOpReceiver.

Definition at line 3815 of file display_list_unittests.cc.

3815 {
3816 // This method should not be called since we override the variant with
3817 // the total_content_depth parameter.
3818 FAIL() << "save(no depth parameter) method should not be called";
3819 }
#define FAIL(name, result)

◆ save() [2/2]

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

Reimplemented from flutter::DlOpReceiver.

Definition at line 3821 of file display_list_unittests.cc.

3821 {
3822 ASSERT_LT(index_, depth_expectations_.size());
3823 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
3824 << "at index " << index_;
3825 index_++;
3826 }

◆ saveLayer() [1/2]

void flutter::testing::DepthExpector::saveLayer ( const SkRect bounds,
const SaveLayerOptions options,
uint32_t  total_content_depth,
const DlImageFilter backdrop 
)
inlineoverridevirtual

Reimplemented from flutter::DlOpReceiver.

Definition at line 3836 of file display_list_unittests.cc.

3839 {
3840 ASSERT_LT(index_, depth_expectations_.size());
3841 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
3842 << "at index " << index_;
3843 index_++;
3844 }

◆ saveLayer() [2/2]

void flutter::testing::DepthExpector::saveLayer ( const SkRect bounds,
SaveLayerOptions  options,
const DlImageFilter backdrop 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 3828 of file display_list_unittests.cc.

3830 {
3831 // This method should not be called since we override the variant with
3832 // the total_content_depth parameter.
3833 FAIL() << "saveLayer(no depth parameter) method should not be called";
3834 }

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