Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
flutter::testing::DlOpRecorder Class Referencefinal

A custom |DlOpReceiver| that records some |DlOps| it receives. More...

Inheritance diagram for flutter::testing::DlOpRecorder:
flutter::DlOpReceiver flutter::IgnoreAttributeDispatchHelper flutter::IgnoreClipDispatchHelper flutter::IgnoreDrawDispatchHelper flutter::IgnoreTransformDispatchHelper

Public Member Functions

int lineCount () const
 
int rectCount () const
 
int pathCount () const
 
int textFrameCount () const
 
int blobCount () const
 
bool hasPathEffect () 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 save (uint32_t total_content_depth)
 
virtual void saveLayer (const SkRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, const DlImageFilter *backdrop=nullptr)
 
virtual void saveLayer (const SkRect *bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr) final
 

Private Member Functions

void drawLine (const SkPoint &p0, const SkPoint &p1) override
 
void drawTextFrame (const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override
 
void drawTextBlob (const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y) override
 
void drawRect (const SkRect &rect) override
 
void drawPath (const SkPath &path) override
 
void setPathEffect (const DlPathEffect *effect) override
 

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

A custom |DlOpReceiver| that records some |DlOps| it receives.

Definition at line 22 of file paragraph_unittests.cc.

Member Function Documentation

◆ blobCount()

int flutter::testing::DlOpRecorder::blobCount ( ) const
inline

Definition at line 32 of file paragraph_unittests.cc.

32{ return blobs_.size(); }

◆ drawLine()

void flutter::testing::DlOpRecorder::drawLine ( const SkPoint p0,
const SkPoint p1 
)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 36 of file paragraph_unittests.cc.

36 {
37 lines_.emplace_back(p0, p1);
38 }

◆ drawPath()

void flutter::testing::DlOpRecorder::drawPath ( const SkPath path)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 54 of file paragraph_unittests.cc.

54{ paths_.push_back(path); }
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

◆ drawRect()

void flutter::testing::DlOpRecorder::drawRect ( const SkRect rect)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 52 of file paragraph_unittests.cc.

52{ rects_.push_back(rect); }

◆ drawTextBlob()

void flutter::testing::DlOpRecorder::drawTextBlob ( const sk_sp< SkTextBlob blob,
SkScalar  x,
SkScalar  y 
)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 46 of file paragraph_unittests.cc.

48 {
49 blobs_.push_back(blob);
50 }

◆ drawTextFrame()

void flutter::testing::DlOpRecorder::drawTextFrame ( const std::shared_ptr< impeller::TextFrame > &  text_frame,
SkScalar  x,
SkScalar  y 
)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 40 of file paragraph_unittests.cc.

42 {
43 text_frames_.push_back(text_frame);
44 }

◆ hasPathEffect()

bool flutter::testing::DlOpRecorder::hasPathEffect ( ) const
inline

Definition at line 33 of file paragraph_unittests.cc.

33{ return path_effect_ != nullptr; }

◆ lineCount()

int flutter::testing::DlOpRecorder::lineCount ( ) const
inline

Definition at line 28 of file paragraph_unittests.cc.

28{ return lines_.size(); }

◆ pathCount()

int flutter::testing::DlOpRecorder::pathCount ( ) const
inline

Definition at line 30 of file paragraph_unittests.cc.

30{ return paths_.size(); }

◆ rectCount()

int flutter::testing::DlOpRecorder::rectCount ( ) const
inline

Definition at line 29 of file paragraph_unittests.cc.

29{ return rects_.size(); }

◆ setPathEffect()

void flutter::testing::DlOpRecorder::setPathEffect ( const DlPathEffect effect)
inlineoverrideprivatevirtual

Implements flutter::DlOpReceiver.

Definition at line 56 of file paragraph_unittests.cc.

56 {
57 path_effect_ = effect;
58 }

◆ textFrameCount()

int flutter::testing::DlOpRecorder::textFrameCount ( ) const
inline

Definition at line 31 of file paragraph_unittests.cc.

31{ return text_frames_.size(); }

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