Flutter Engine
The Flutter Engine
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, DlBlendMode max_content_mode, const DlImageFilter *backdrop) override
 
bool all_depths_checked () const
 
- 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 setAntiAlias (bool aa)=0
 
virtual void setDrawStyle (DlDrawStyle style)=0
 
virtual void setColor (DlColor color)=0
 
virtual void setStrokeWidth (float width)=0
 
virtual void setStrokeMiter (float limit)=0
 
virtual void setStrokeCap (DlStrokeCap cap)=0
 
virtual void setStrokeJoin (DlStrokeJoin join)=0
 
virtual void setColorSource (const DlColorSource *source)=0
 
virtual void setColorFilter (const DlColorFilter *filter)=0
 
virtual void setInvertColors (bool invert)=0
 
virtual void setBlendMode (DlBlendMode mode)=0
 
virtual void setMaskFilter (const DlMaskFilter *filter)=0
 
virtual void setImageFilter (const DlImageFilter *filter)=0
 
virtual void save ()=0
 
virtual void save (uint32_t total_content_depth)
 
virtual void saveLayer (const SkRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr)=0
 
virtual void saveLayer (const SkRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, DlBlendMode max_content_blend_mode, const DlImageFilter *backdrop=nullptr)
 
virtual void restore ()=0
 
virtual void saveLayer (const SkRect *bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr) final
 
virtual void translate (SkScalar tx, SkScalar ty)=0
 
virtual void scale (SkScalar sx, SkScalar sy)=0
 
virtual void rotate (SkScalar degrees)=0
 
virtual void skew (SkScalar sx, SkScalar sy)=0
 
virtual void transform2DAffine (SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt)=0
 
virtual void transformFullPerspective (SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt)=0
 
virtual void transformReset ()=0
 
virtual void clipRect (const SkRect &rect, ClipOp clip_op, bool is_aa)=0
 
virtual void clipRRect (const SkRRect &rrect, ClipOp clip_op, bool is_aa)=0
 
virtual void clipPath (const SkPath &path, ClipOp clip_op, bool is_aa)=0
 
virtual void drawColor (DlColor color, DlBlendMode mode)=0
 
virtual void drawPaint ()=0
 
virtual void drawLine (const SkPoint &p0, const SkPoint &p1)=0
 
virtual void drawDashedLine (const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length)=0
 
virtual void drawRect (const SkRect &rect)=0
 
virtual void drawOval (const SkRect &bounds)=0
 
virtual void drawCircle (const SkPoint &center, SkScalar radius)=0
 
virtual void drawRRect (const SkRRect &rrect)=0
 
virtual void drawDRRect (const SkRRect &outer, const SkRRect &inner)=0
 
virtual void drawPath (const SkPath &path)=0
 
virtual void drawArc (const SkRect &oval_bounds, SkScalar start_degrees, SkScalar sweep_degrees, bool use_center)=0
 
virtual void drawPoints (PointMode mode, uint32_t count, const SkPoint points[])=0
 
virtual void drawVertices (const DlVertices *vertices, DlBlendMode mode)=0
 
virtual void drawImage (const sk_sp< DlImage > image, const SkPoint point, DlImageSampling sampling, bool render_with_attributes)=0
 
virtual void drawImageRect (const sk_sp< DlImage > image, const SkRect &src, const SkRect &dst, DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint=SrcRectConstraint::kFast)=0
 
virtual void drawImageNine (const sk_sp< DlImage > image, const SkIRect &center, const SkRect &dst, DlFilterMode filter, bool render_with_attributes)=0
 
virtual void drawAtlas (const sk_sp< DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const SkRect *cull_rect, bool render_with_attributes)=0
 
virtual void drawDisplayList (const sk_sp< DisplayList > display_list, SkScalar opacity=SK_Scalar1)=0
 
virtual void drawTextBlob (const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y)=0
 
virtual void drawTextFrame (const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y)=0
 
virtual void drawShadow (const SkPath &path, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr)=0
 

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

Constructor & Destructor Documentation

◆ DepthExpector()

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

Definition at line 3926 of file display_list_unittests.cc.

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

Member Function Documentation

◆ all_depths_checked()

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

Definition at line 3961 of file display_list_unittests.cc.

3961 {
3962 return index_ == depth_expectations_.size();
3963 }

◆ save() [1/2]

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

Implements flutter::DlOpReceiver.

Definition at line 3929 of file display_list_unittests.cc.

3929 {
3930 // This method should not be called since we override the variant with
3931 // the total_content_depth parameter.
3932 FAIL() << "save(no depth parameter) method should not be called";
3933 }
#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 3935 of file display_list_unittests.cc.

3935 {
3936 ASSERT_LT(index_, depth_expectations_.size());
3937 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
3938 << "at index " << index_;
3939 index_++;
3940 }

◆ saveLayer() [1/2]

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

Reimplemented from flutter::DlOpReceiver.

Definition at line 3950 of file display_list_unittests.cc.

3954 {
3955 ASSERT_LT(index_, depth_expectations_.size());
3956 EXPECT_EQ(depth_expectations_[index_], total_content_depth)
3957 << "at index " << index_;
3958 index_++;
3959 }

◆ saveLayer() [2/2]

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

Implements flutter::DlOpReceiver.

Definition at line 3942 of file display_list_unittests.cc.

3944 {
3945 // This method should not be called since we override the variant with
3946 // the total_content_depth parameter.
3947 FAIL() << "saveLayer(no depth parameter) method should not be called";
3948 }

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