Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
flutter::testing::ClipExpector Class Reference
Inheritance diagram for flutter::testing::ClipExpector:
flutter::DlOpReceiver flutter::IgnoreAttributeDispatchHelper flutter::IgnoreTransformDispatchHelper flutter::IgnoreDrawDispatchHelper

Classes

struct  Expectation
 

Public Member Functions

 ClipExpector (const std::string &file, int line)
 
 ~ClipExpector ()
 
ClipExpectoraddExpectation (const SkRect &rect, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)
 
ClipExpectoraddExpectation (const SkRRect &rrect, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)
 
ClipExpectoraddExpectation (const SkPath &path, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)
 
void clipRect (const SkRect &rect, DlCanvas::ClipOp clip_op, bool is_aa) override
 
void clipRRect (const SkRRect &rrect, DlCanvas::ClipOp clip_op, bool is_aa) override
 
void clipPath (const SkPath &path, DlCanvas::ClipOp clip_op, bool is_aa) 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 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 4336 of file display_list_unittests.cc.

Constructor & Destructor Documentation

◆ ClipExpector()

flutter::testing::ClipExpector::ClipExpector ( const std::string &  file,
int  line 
)
inlineexplicit

Definition at line 4361 of file display_list_unittests.cc.

4362 : file_(file), line_(line) {}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent Remove all existing persistent cache This is mainly for debugging purposes such as reproducing the shader compilation jank trace to file
Definition: switches.h:201

◆ ~ClipExpector()

flutter::testing::ClipExpector::~ClipExpector ( )
inline

Definition at line 4364 of file display_list_unittests.cc.

4364 { //
4365 EXPECT_EQ(index_, clip_expectations_.size()) << label();
4366 }

Member Function Documentation

◆ addExpectation() [1/3]

ClipExpector & flutter::testing::ClipExpector::addExpectation ( const SkPath path,
ClipOp  clip_op = ClipOp::kIntersect,
bool  is_aa = false 
)
inline

Definition at line 4390 of file display_list_unittests.cc.

4392 {
4393 clip_expectations_.push_back({
4394 .shape = path,
4395 .clip_op = clip_op,
4396 .is_aa = is_aa,
4397 });
4398 return *this;
4399 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57

◆ addExpectation() [2/3]

ClipExpector & flutter::testing::ClipExpector::addExpectation ( const SkRect rect,
ClipOp  clip_op = ClipOp::kIntersect,
bool  is_aa = false 
)
inline

Definition at line 4368 of file display_list_unittests.cc.

4370 {
4371 clip_expectations_.push_back({
4372 .shape = rect,
4373 .clip_op = clip_op,
4374 .is_aa = is_aa,
4375 });
4376 return *this;
4377 }
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ addExpectation() [3/3]

ClipExpector & flutter::testing::ClipExpector::addExpectation ( const SkRRect rrect,
ClipOp  clip_op = ClipOp::kIntersect,
bool  is_aa = false 
)
inline

Definition at line 4379 of file display_list_unittests.cc.

4381 {
4382 clip_expectations_.push_back({
4383 .shape = rrect,
4384 .clip_op = clip_op,
4385 .is_aa = is_aa,
4386 });
4387 return *this;
4388 }
SkRRect rrect
Definition: SkRecords.h:232

◆ clipPath()

void flutter::testing::ClipExpector::clipPath ( const SkPath path,
DlCanvas::ClipOp  clip_op,
bool  is_aa 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 4411 of file display_list_unittests.cc.

4413 {
4414 check(path, clip_op, is_aa);
4415 }

◆ clipRect()

void flutter::testing::ClipExpector::clipRect ( const SkRect rect,
DlCanvas::ClipOp  clip_op,
bool  is_aa 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 4401 of file display_list_unittests.cc.

4403 {
4404 check(rect, clip_op, is_aa);
4405 }

◆ clipRRect()

void flutter::testing::ClipExpector::clipRRect ( const SkRRect rrect,
DlCanvas::ClipOp  clip_op,
bool  is_aa 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 4406 of file display_list_unittests.cc.

4408 {
4409 check(rrect, clip_op, is_aa);
4410 }

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