Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Attributes | Protected Types | List of all members
flutter::DlOpReceiver Class Referenceabstract

Internal API for rendering recorded display lists to backends. More...

#include <dl_op_receiver.h>

Inheritance diagram for flutter::DlOpReceiver:
flutter::ComplexityCalculatorHelper flutter::DisplayListBuilder flutter::DlOpSpy flutter::DlSkCanvasDispatcher flutter::DlSkPaintDispatchHelper flutter::IgnoreAttributeDispatchHelper flutter::IgnoreClipDispatchHelper flutter::IgnoreDrawDispatchHelper flutter::IgnoreTransformDispatchHelper flutter::testing::ClipExpector flutter::testing::DepthExpector flutter::testing::DisplayListStreamDispatcher flutter::testing::DlOpRecorder flutter::testing::MockDispatchHelper flutter::testing::SaveLayerBoundsExpector flutter::testing::SaveLayerExpector impeller::DlDispatcherBase

Classes

struct  CacheablePath
 

Public Member Functions

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
 

Static Public Attributes

static constexpr int kMaxDrawPointsCount = ((1 << 29) - 1)
 

Protected Types

using ClipOp = DlCanvas::ClipOp
 
using PointMode = DlCanvas::PointMode
 
using SrcRectConstraint = DlCanvas::SrcRectConstraint
 

Detailed Description

Internal API for rendering recorded display lists to backends.

The |DisplayList| object will play back recorded operations in this format. Most developers should not need to deal with this interface unless they are writing a utility that needs to examine the contents of a display list.

Similar to |DlCanvas|, this interface carries clip and transform state which are saved and restored by the |save|, |saveLayer|, and |restore| calls.

Unlike DlCanvas, this interface has attribute state which is global across an entire DisplayList (not affected by save/restore).

DISPLAYLIST DEPTH TRACKING

Each rendering call in the DisplayList stream is assumed to have a "depth" value relative to the beginning of its DisplayList. The depth value is implicitly allocated during recording and only reported in 2 places so it is important for a dispatcher to perform the same internal allocations if it is to make sense of the information reported by the save/saveLayer calls. This depth value is maintained as follows:

See also
DlSkCanvasDispatcher
impeller::DlDispatcher
DlOpSpy

Definition at line 89 of file dl_op_receiver.h.

Member Typedef Documentation

◆ ClipOp

Definition at line 91 of file dl_op_receiver.h.

◆ PointMode

Definition at line 92 of file dl_op_receiver.h.

◆ SrcRectConstraint

Definition at line 93 of file dl_op_receiver.h.

Member Function Documentation

◆ clipPath() [1/2]

virtual void flutter::DlOpReceiver::clipPath ( const CacheablePath cache,
ClipOp  clip_op,
bool  is_aa 
)
inlinevirtual

Reimplemented in impeller::DlDispatcherBase.

Definition at line 124 of file dl_op_receiver.h.

126 {
128 }
#define FML_UNREACHABLE()
Definition: logging.h:109

◆ clipPath() [2/2]

virtual void flutter::DlOpReceiver::clipPath ( const SkPath path,
ClipOp  clip_op,
bool  is_aa 
)
pure virtual

◆ clipRect()

virtual void flutter::DlOpReceiver::clipRect ( const SkRect rect,
ClipOp  clip_op,
bool  is_aa 
)
pure virtual

◆ clipRRect()

virtual void flutter::DlOpReceiver::clipRRect ( const SkRRect rrect,
ClipOp  clip_op,
bool  is_aa 
)
pure virtual

◆ drawArc()

virtual void flutter::DlOpReceiver::drawArc ( const SkRect oval_bounds,
SkScalar  start_degrees,
SkScalar  sweep_degrees,
bool  use_center 
)
pure virtual

◆ drawAtlas()

virtual void flutter::DlOpReceiver::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 
)
pure virtual

◆ drawCircle()

virtual void flutter::DlOpReceiver::drawCircle ( const SkPoint center,
SkScalar  radius 
)
pure virtual

◆ drawColor()

virtual void flutter::DlOpReceiver::drawColor ( DlColor  color,
DlBlendMode  mode 
)
pure virtual

◆ drawDashedLine()

virtual void flutter::DlOpReceiver::drawDashedLine ( const DlPoint p0,
const DlPoint p1,
DlScalar  on_length,
DlScalar  off_length 
)
pure virtual

◆ drawDisplayList()

virtual void flutter::DlOpReceiver::drawDisplayList ( const sk_sp< DisplayList display_list,
SkScalar  opacity = SK_Scalar1 
)
pure virtual

◆ drawDRRect()

virtual void flutter::DlOpReceiver::drawDRRect ( const SkRRect outer,
const SkRRect inner 
)
pure virtual

◆ drawImage()

virtual void flutter::DlOpReceiver::drawImage ( const sk_sp< DlImage image,
const SkPoint  point,
DlImageSampling  sampling,
bool  render_with_attributes 
)
pure virtual

◆ drawImageNine()

virtual void flutter::DlOpReceiver::drawImageNine ( const sk_sp< DlImage image,
const SkIRect center,
const SkRect dst,
DlFilterMode  filter,
bool  render_with_attributes 
)
pure virtual

◆ drawImageRect()

virtual void flutter::DlOpReceiver::drawImageRect ( const sk_sp< DlImage image,
const SkRect src,
const SkRect dst,
DlImageSampling  sampling,
bool  render_with_attributes,
SrcRectConstraint  constraint = SrcRectConstraint::kFast 
)
pure virtual

◆ drawLine()

virtual void flutter::DlOpReceiver::drawLine ( const SkPoint p0,
const SkPoint p1 
)
pure virtual

◆ drawOval()

virtual void flutter::DlOpReceiver::drawOval ( const SkRect bounds)
pure virtual

◆ drawPaint()

virtual void flutter::DlOpReceiver::drawPaint ( )
pure virtual

◆ drawPath() [1/2]

virtual void flutter::DlOpReceiver::drawPath ( const CacheablePath cache)
inlinevirtual

Reimplemented in impeller::DlDispatcherBase.

Definition at line 129 of file dl_op_receiver.h.

129{ FML_UNREACHABLE(); }

◆ drawPath() [2/2]

virtual void flutter::DlOpReceiver::drawPath ( const SkPath path)
pure virtual

◆ drawPoints()

virtual void flutter::DlOpReceiver::drawPoints ( PointMode  mode,
uint32_t  count,
const SkPoint  points[] 
)
pure virtual

◆ drawRect()

virtual void flutter::DlOpReceiver::drawRect ( const SkRect rect)
pure virtual

◆ drawRRect()

virtual void flutter::DlOpReceiver::drawRRect ( const SkRRect rrect)
pure virtual

◆ drawShadow() [1/2]

virtual void flutter::DlOpReceiver::drawShadow ( const CacheablePath cache,
const DlColor  color,
const SkScalar  elevation,
bool  transparent_occluder,
SkScalar  dpr 
)
inlinevirtual

Reimplemented in impeller::DlDispatcherBase.

Definition at line 130 of file dl_op_receiver.h.

134 {
136 }

◆ drawShadow() [2/2]

virtual void flutter::DlOpReceiver::drawShadow ( const SkPath path,
const DlColor  color,
const SkScalar  elevation,
bool  transparent_occluder,
SkScalar  dpr 
)
pure virtual

◆ drawTextBlob()

virtual void flutter::DlOpReceiver::drawTextBlob ( const sk_sp< SkTextBlob blob,
SkScalar  x,
SkScalar  y 
)
pure virtual

◆ drawTextFrame()

virtual void flutter::DlOpReceiver::drawTextFrame ( const std::shared_ptr< impeller::TextFrame > &  text_frame,
SkScalar  x,
SkScalar  y 
)
pure virtual

◆ drawVertices()

virtual void flutter::DlOpReceiver::drawVertices ( const DlVertices vertices,
DlBlendMode  mode 
)
pure virtual

◆ PrefersImpellerPaths()

virtual bool flutter::DlOpReceiver::PrefersImpellerPaths ( ) const
inlinevirtual

Reimplemented in impeller::DlDispatcherBase.

Definition at line 111 of file dl_op_receiver.h.

111{ return false; }

◆ restore()

virtual void flutter::DlOpReceiver::restore ( )
pure virtual

◆ rotate()

virtual void flutter::DlOpReceiver::rotate ( SkScalar  degrees)
pure virtual

◆ save() [1/2]

virtual void flutter::DlOpReceiver::save ( )
pure virtual

◆ save() [2/2]

virtual void flutter::DlOpReceiver::save ( uint32_t  total_content_depth)
inlinevirtual

◆ saveLayer() [1/3]

virtual void flutter::DlOpReceiver::saveLayer ( const SkRect bounds,
const SaveLayerOptions options,
uint32_t  total_content_depth,
DlBlendMode  max_content_blend_mode,
const DlImageFilter backdrop = nullptr 
)
inlinevirtual

Reimplemented in impeller::DlDispatcherBase, impeller::DlDispatcher, impeller::ExperimentalDlDispatcher, flutter::testing::SaveLayerExpector, and flutter::testing::DepthExpector.

Definition at line 189 of file dl_op_receiver.h.

193 {
195 }
const char * options
virtual void saveLayer(const SkRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop=nullptr)=0
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< const SkImageFilter > backdrop
Definition: SkRecords.h:191

◆ saveLayer() [2/3]

virtual void flutter::DlOpReceiver::saveLayer ( const SkRect bounds,
const SaveLayerOptions  options,
const DlImageFilter backdrop = nullptr 
)
pure virtual

◆ saveLayer() [3/3]

virtual void flutter::DlOpReceiver::saveLayer ( const SkRect bounds,
const SaveLayerOptions  options,
const DlImageFilter backdrop = nullptr 
)
inlinefinalvirtual

Definition at line 213 of file dl_op_receiver.h.

215 {
216 if (bounds) {
217 saveLayer(*bounds, options.with_bounds_from_caller(), backdrop);
218 } else {
219 saveLayer(SkRect(), options.without_bounds_from_caller(), backdrop);
220 }
221 }

◆ scale()

virtual void flutter::DlOpReceiver::scale ( SkScalar  sx,
SkScalar  sy 
)
pure virtual

◆ setAntiAlias()

virtual void flutter::DlOpReceiver::setAntiAlias ( bool  aa)
pure virtual

◆ setBlendMode()

virtual void flutter::DlOpReceiver::setBlendMode ( DlBlendMode  mode)
pure virtual

◆ setColor()

virtual void flutter::DlOpReceiver::setColor ( DlColor  color)
pure virtual

◆ setColorFilter()

virtual void flutter::DlOpReceiver::setColorFilter ( const DlColorFilter filter)
pure virtual

◆ setColorSource()

virtual void flutter::DlOpReceiver::setColorSource ( const DlColorSource source)
pure virtual

◆ setDrawStyle()

virtual void flutter::DlOpReceiver::setDrawStyle ( DlDrawStyle  style)
pure virtual

◆ setImageFilter()

virtual void flutter::DlOpReceiver::setImageFilter ( const DlImageFilter filter)
pure virtual

◆ setInvertColors()

virtual void flutter::DlOpReceiver::setInvertColors ( bool  invert)
pure virtual

◆ setMaskFilter()

virtual void flutter::DlOpReceiver::setMaskFilter ( const DlMaskFilter filter)
pure virtual

◆ setStrokeCap()

virtual void flutter::DlOpReceiver::setStrokeCap ( DlStrokeCap  cap)
pure virtual

◆ setStrokeJoin()

virtual void flutter::DlOpReceiver::setStrokeJoin ( DlStrokeJoin  join)
pure virtual

◆ setStrokeMiter()

virtual void flutter::DlOpReceiver::setStrokeMiter ( float  limit)
pure virtual

◆ setStrokeWidth()

virtual void flutter::DlOpReceiver::setStrokeWidth ( float  width)
pure virtual

◆ skew()

virtual void flutter::DlOpReceiver::skew ( SkScalar  sx,
SkScalar  sy 
)
pure virtual

◆ transform2DAffine()

virtual void flutter::DlOpReceiver::transform2DAffine ( SkScalar  mxx,
SkScalar  mxy,
SkScalar  mxt,
SkScalar  myx,
SkScalar  myy,
SkScalar  myt 
)
pure virtual

◆ transformFullPerspective()

virtual void flutter::DlOpReceiver::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 
)
pure virtual

◆ transformReset()

virtual void flutter::DlOpReceiver::transformReset ( )
pure virtual

◆ translate()

virtual void flutter::DlOpReceiver::translate ( SkScalar  tx,
SkScalar  ty 
)
pure virtual

Member Data Documentation

◆ kMaxDrawPointsCount

constexpr int flutter::DlOpReceiver::kMaxDrawPointsCount = ((1 << 29) - 1)
staticconstexpr

Definition at line 97 of file dl_op_receiver.h.


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