Flutter Engine
 
Loading...
Searching...
No Matches
flutter::DlOpSpy Class Referencefinal

#include <dl_op_spy.h>

Inheritance diagram for flutter::DlOpSpy:
flutter::DlOpReceiver flutter::IgnoreAttributeDispatchHelper flutter::IgnoreClipDispatchHelper flutter::IgnoreTransformDispatchHelper

Public Member Functions

bool did_draw ()
 Returns true if any non transparent content has been drawn.
 
- Public Member Functions inherited from flutter::DlOpReceiver
virtual void save (uint32_t total_content_depth)
 
virtual void saveLayer (const DlRect &bounds, const SaveLayerOptions &options, uint32_t total_content_depth, DlBlendMode max_content_blend_mode, const DlImageFilter *backdrop=nullptr, std::optional< int64_t > backdrop_id=std::nullopt)
 
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

Receives to drawing commands of a DisplayListBuilder.

This is used to determine whether any non-transparent pixels will be drawn on the canvas. All the drawImage operations are considered drawing non-transparent pixels.

To use this class, dispatch the operations from DisplayList to a concrete DlOpSpy object, and check the result of did_draw method.

DlOpSpy dl_op_spy;
display_list.Dispatch(dl_op_spy);
bool did_draw = dl_op_spy.did_draw()
bool did_draw()
Returns true if any non transparent content has been drawn.
Definition dl_op_spy.cc:9

Definition at line 29 of file dl_op_spy.h.

Member Function Documentation

◆ did_draw()

bool flutter::DlOpSpy::did_draw ( )

Returns true if any non transparent content has been drawn.

Definition at line 9 of file dl_op_spy.cc.

9 {
10 return did_draw_;
11}

Referenced by flutter::EmbedderExternalView::HasEngineRenderedContents(), flutter::testing::TEST(), and flutter::testing::TEST().


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