Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
impeller::ExperimentalDlDispatcher Class Reference

#include <dl_dispatcher.h>

Inheritance diagram for impeller::ExperimentalDlDispatcher:
impeller::DlDispatcherBase flutter::DlOpReceiver

Public Member Functions

 ExperimentalDlDispatcher (ContentContext &renderer, RenderTarget &render_target, bool has_root_backdrop_filter, flutter::DlBlendMode max_root_blend_mode, IRect cull_rect)
 
 ~ExperimentalDlDispatcher ()=default
 
void save () override
 
void saveLayer (const SkRect &bounds, const flutter::SaveLayerOptions options, const flutter::DlImageFilter *backdrop) override
 
void FinishRecording ()
 
void save (uint32_t total_content_depth) override
 
void saveLayer (const SkRect &bounds, const flutter::SaveLayerOptions &options, uint32_t total_content_depth, flutter::DlBlendMode max_content_mode, const flutter::DlImageFilter *backdrop) override
 
- Public Member Functions inherited from impeller::DlDispatcherBase
Picture EndRecordingAsPicture ()
 
bool PrefersImpellerPaths () const override
 
void setAntiAlias (bool aa) override
 
void setDrawStyle (flutter::DlDrawStyle style) override
 
void setColor (flutter::DlColor color) override
 
void setStrokeWidth (SkScalar width) override
 
void setStrokeMiter (SkScalar limit) override
 
void setStrokeCap (flutter::DlStrokeCap cap) override
 
void setStrokeJoin (flutter::DlStrokeJoin join) override
 
void setColorSource (const flutter::DlColorSource *source) override
 
void setColorFilter (const flutter::DlColorFilter *filter) override
 
void setInvertColors (bool invert) override
 
void setBlendMode (flutter::DlBlendMode mode) override
 
void setMaskFilter (const flutter::DlMaskFilter *filter) override
 
void setImageFilter (const flutter::DlImageFilter *filter) override
 
void save (uint32_t total_content_depth) override
 
void saveLayer (const SkRect &bounds, const flutter::SaveLayerOptions &options, uint32_t total_content_depth, flutter::DlBlendMode max_content_mode, const flutter::DlImageFilter *backdrop) override
 
void restore () override
 
void translate (SkScalar tx, SkScalar ty) override
 
void scale (SkScalar sx, SkScalar sy) override
 
void rotate (SkScalar degrees) override
 
void skew (SkScalar sx, SkScalar sy) override
 
void transform2DAffine (SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override
 
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) override
 
void transformReset () override
 
void clipRect (const SkRect &rect, ClipOp clip_op, bool is_aa) override
 
void clipRRect (const SkRRect &rrect, ClipOp clip_op, bool is_aa) override
 
void clipPath (const SkPath &path, ClipOp clip_op, bool is_aa) override
 
void clipPath (const CacheablePath &cache, ClipOp clip_op, bool is_aa) override
 
void drawColor (flutter::DlColor color, flutter::DlBlendMode mode) override
 
void drawPaint () override
 
void drawLine (const SkPoint &p0, const SkPoint &p1) override
 
void drawDashedLine (const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
 
void drawRect (const SkRect &rect) override
 
void drawOval (const SkRect &bounds) override
 
void drawCircle (const SkPoint &center, SkScalar radius) override
 
void drawRRect (const SkRRect &rrect) override
 
void drawDRRect (const SkRRect &outer, const SkRRect &inner) override
 
void drawPath (const SkPath &path) override
 
void drawPath (const CacheablePath &cache) override
 
void drawArc (const SkRect &oval_bounds, SkScalar start_degrees, SkScalar sweep_degrees, bool use_center) override
 
void drawPoints (PointMode mode, uint32_t count, const SkPoint points[]) override
 
void drawVertices (const flutter::DlVertices *vertices, flutter::DlBlendMode dl_mode) override
 
void drawImage (const sk_sp< flutter::DlImage > image, const SkPoint point, flutter::DlImageSampling sampling, bool render_with_attributes) override
 
void drawImageRect (const sk_sp< flutter::DlImage > image, const SkRect &src, const SkRect &dst, flutter::DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint) override
 
void drawImageNine (const sk_sp< flutter::DlImage > image, const SkIRect &center, const SkRect &dst, flutter::DlFilterMode filter, bool render_with_attributes) override
 
void drawAtlas (const sk_sp< flutter::DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const flutter::DlColor colors[], int count, flutter::DlBlendMode mode, flutter::DlImageSampling sampling, const SkRect *cull_rect, bool render_with_attributes) override
 
void drawDisplayList (const sk_sp< flutter::DisplayList > display_list, SkScalar opacity) override
 
void drawTextBlob (const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y) override
 
void drawTextFrame (const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override
 
void drawShadow (const SkPath &path, const flutter::DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override
 
void drawShadow (const CacheablePath &cache, const flutter::DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override
 
virtual CanvasGetCanvas ()=0
 
- 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 298 of file dl_dispatcher.h.

Constructor & Destructor Documentation

◆ ExperimentalDlDispatcher()

impeller::ExperimentalDlDispatcher::ExperimentalDlDispatcher ( ContentContext renderer,
RenderTarget render_target,
bool  has_root_backdrop_filter,
flutter::DlBlendMode  max_root_blend_mode,
IRect  cull_rect 
)

Definition at line 1216 of file dl_dispatcher.cc.

1222 : canvas_(renderer,
1223 render_target,
1224 has_root_backdrop_filter ||
1225 RequiresReadbackForBlends(renderer, max_root_blend_mode),
1226 cull_rect) {}
static bool RequiresReadbackForBlends(const ContentContext &renderer, flutter::DlBlendMode max_root_blend_mode)

◆ ~ExperimentalDlDispatcher()

impeller::ExperimentalDlDispatcher::~ExperimentalDlDispatcher ( )
default

Member Function Documentation

◆ FinishRecording()

void impeller::ExperimentalDlDispatcher::FinishRecording ( )
inline

Definition at line 326 of file dl_dispatcher.h.

◆ save() [1/2]

void impeller::ExperimentalDlDispatcher::save ( )
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 309 of file dl_dispatcher.h.

309 {
310 // This dispatcher should never be used with the save() variant
311 // that does not include the content_depth parameter.
313 }
#define FML_UNREACHABLE()
Definition: logging.h:109

◆ save() [2/2]

void impeller::DlDispatcherBase::save ( uint32_t  total_content_depth)
overridevirtual

Reimplemented from impeller::DlDispatcherBase.

Definition at line 70 of file dl_dispatcher.cc.

611 {
612 GetCanvas().Save(total_content_depth);
613}
virtual void Save(uint32_t total_content_depth=kMaxDepth)
Definition: canvas.cc:184

◆ saveLayer() [1/2]

void impeller::DlDispatcherBase::saveLayer ( const SkRect bounds,
const flutter::SaveLayerOptions options,
uint32_t  total_content_depth,
flutter::DlBlendMode  max_content_mode,
const flutter::DlImageFilter backdrop 
)
overridevirtual

Reimplemented from impeller::DlDispatcherBase.

Definition at line 73 of file dl_dispatcher.cc.

620 {
621 auto paint = options.renders_with_attributes() ? paint_ : Paint{};
622 auto promise = options.content_is_clipped()
626 ToImageFilter(backdrop), promise, total_content_depth,
627 options.can_distribute_opacity());
628}
const char * options
virtual void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown, uint32_t total_content_depth=kMaxDepth, bool can_distribute_opacity=false)
Definition: canvas.cc:842
const Paint & paint
Definition: color_source.cc:38
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< const SkImageFilter > backdrop
Definition: SkRecords.h:191
Rect ToRect(const SkRect &rect)
static std::shared_ptr< ImageFilter > ToImageFilter(const flutter::DlImageFilter *filter)
@ kMayClipContents
The caller claims the bounds are a subset of an estimate of the reasonably tight bounds but likely cl...
@ kContainsContents
The caller claims the bounds are a reasonably tight estimate of the coverage of the contents and shou...

◆ saveLayer() [2/2]

void impeller::ExperimentalDlDispatcher::saveLayer ( const SkRect bounds,
const flutter::SaveLayerOptions  options,
const flutter::DlImageFilter backdrop 
)
inlineoverridevirtual

Implements flutter::DlOpReceiver.

Definition at line 317 of file dl_dispatcher.h.

319 {
320 // This dispatcher should never be used with the saveLayer() variant
321 // that does not include the content_depth parameter.
323 }

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