Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::DlCanvasDelegate Class Reference

Inherits flutter::LayerStateStack::Delegate.

Public Member Functions

 DlCanvasDelegate (DlCanvas *canvas)
 
void decommission () override
 
DlCanvascanvas () const override
 
SkRect local_cull_rect () const override
 
SkRect device_cull_rect () const override
 
SkM44 matrix_4x4 () const override
 
SkMatrix matrix_3x3 () const override
 
bool content_culled (const SkRect &content_bounds) const override
 
void save () override
 
void saveLayer (const SkRect &bounds, LayerStateStack::RenderingAttributes &attributes, DlBlendMode blend_mode, const DlImageFilter *backdrop) override
 
void restore () override
 
void translate (SkScalar tx, SkScalar ty) override
 
void transform (const SkM44 &m44) override
 
void transform (const SkMatrix &matrix) override
 
void integralTransform () override
 
void clipRect (const SkRect &rect, ClipOp op, bool is_aa) override
 
void clipRRect (const SkRRect &rrect, ClipOp op, bool is_aa) override
 
void clipPath (const SkPath &path, ClipOp op, bool is_aa) override
 

Detailed Description

Definition at line 75 of file layer_state_stack.cc.

Constructor & Destructor Documentation

◆ DlCanvasDelegate()

flutter::DlCanvasDelegate::DlCanvasDelegate ( DlCanvas canvas)
inlineexplicit

Definition at line 77 of file layer_state_stack.cc.

78 : canvas_(canvas), initial_save_level_(canvas->GetSaveCount()) {}
DlCanvas * canvas() const override
virtual int GetSaveCount() const =0

Member Function Documentation

◆ canvas()

DlCanvas * flutter::DlCanvasDelegate::canvas ( ) const
inlineoverride

Definition at line 82 of file layer_state_stack.cc.

82{ return canvas_; }

◆ clipPath()

void flutter::DlCanvasDelegate::clipPath ( const SkPath path,
ClipOp  op,
bool  is_aa 
)
inlineoverride

Definition at line 129 of file layer_state_stack.cc.

129 {
130 canvas_->ClipPath(path, op, is_aa);
131 }
virtual void ClipPath(const SkPath &path, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)=0
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

◆ clipRect()

void flutter::DlCanvasDelegate::clipRect ( const SkRect rect,
ClipOp  op,
bool  is_aa 
)
inlineoverride

Definition at line 123 of file layer_state_stack.cc.

123 {
124 canvas_->ClipRect(rect, op, is_aa);
125 }
virtual void ClipRect(const SkRect &rect, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)=0
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ clipRRect()

void flutter::DlCanvasDelegate::clipRRect ( const SkRRect rrect,
ClipOp  op,
bool  is_aa 
)
inlineoverride

Definition at line 126 of file layer_state_stack.cc.

126 {
127 canvas_->ClipRRect(rrect, op, is_aa);
128 }
virtual void ClipRRect(const SkRRect &rrect, ClipOp clip_op=ClipOp::kIntersect, bool is_aa=false)=0
SkRRect rrect
Definition: SkRecords.h:232

◆ content_culled()

bool flutter::DlCanvasDelegate::content_culled ( const SkRect content_bounds) const
inlineoverride

Definition at line 94 of file layer_state_stack.cc.

94 {
95 return canvas_->QuickReject(content_bounds);
96 }
virtual bool QuickReject(const SkRect &bounds) const =0

◆ decommission()

void flutter::DlCanvasDelegate::decommission ( )
inlineoverride

Definition at line 80 of file layer_state_stack.cc.

80{ canvas_->RestoreToCount(initial_save_level_); }
virtual void RestoreToCount(int restore_count)=0

◆ device_cull_rect()

SkRect flutter::DlCanvasDelegate::device_cull_rect ( ) const
inlineoverride

Definition at line 87 of file layer_state_stack.cc.

87 {
88 return canvas_->GetDestinationClipBounds();
89 }
virtual SkRect GetDestinationClipBounds() const =0

◆ integralTransform()

void flutter::DlCanvasDelegate::integralTransform ( )
inlineoverride

Definition at line 116 of file layer_state_stack.cc.

116 {
117 SkM44 integral;
119 canvas_->SetTransform(integral);
120 }
121 }
Definition: SkM44.h:150
SkM44 matrix_4x4() const override
virtual void SetTransform(const SkMatrix *matrix)=0
static bool ComputeIntegralTransCTM(const SkMatrix &in, SkMatrix *out)
Snap the translation components of the |in| matrix to integers and store the snapped matrix in |out|.

◆ local_cull_rect()

SkRect flutter::DlCanvasDelegate::local_cull_rect ( ) const
inlineoverride

Definition at line 84 of file layer_state_stack.cc.

84 {
85 return canvas_->GetLocalClipBounds();
86 }
virtual SkRect GetLocalClipBounds() const =0

◆ matrix_3x3()

SkMatrix flutter::DlCanvasDelegate::matrix_3x3 ( ) const
inlineoverride

Definition at line 93 of file layer_state_stack.cc.

93{ return canvas_->GetTransform(); }
virtual SkMatrix GetTransform() const =0

◆ matrix_4x4()

SkM44 flutter::DlCanvasDelegate::matrix_4x4 ( ) const
inlineoverride

Definition at line 90 of file layer_state_stack.cc.

90 {
91 return canvas_->GetTransformFullPerspective();
92 }
virtual SkM44 GetTransformFullPerspective() const =0

◆ restore()

void flutter::DlCanvasDelegate::restore ( )
inlineoverride

Definition at line 107 of file layer_state_stack.cc.

107{ canvas_->Restore(); }
virtual void Restore()=0

◆ save()

void flutter::DlCanvasDelegate::save ( )
inlineoverride

Definition at line 98 of file layer_state_stack.cc.

98{ canvas_->Save(); }
virtual void Save()=0

◆ saveLayer()

void flutter::DlCanvasDelegate::saveLayer ( const SkRect bounds,
LayerStateStack::RenderingAttributes &  attributes,
DlBlendMode  blend_mode,
const DlImageFilter backdrop 
)
inlineoverride

Definition at line 99 of file layer_state_stack.cc.

102 {
103 TRACE_EVENT0("flutter", "Canvas::saveLayer");
105 canvas_->SaveLayer(&bounds, attributes.fill(paint, blend_mode), backdrop);
106 }
virtual void SaveLayer(const SkRect *bounds, const DlPaint *paint=nullptr, const DlImageFilter *backdrop=nullptr)=0
const Paint & paint
Definition: color_source.cc:38
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< const SkImageFilter > backdrop
Definition: SkRecords.h:191
flutter::DlPaint DlPaint
#define TRACE_EVENT0(category_group, name)
Definition: trace_event.h:131

◆ transform() [1/2]

void flutter::DlCanvasDelegate::transform ( const SkM44 m44)
inlineoverride

Definition at line 112 of file layer_state_stack.cc.

112{ canvas_->Transform(m44); }
virtual void Transform(const SkMatrix *matrix)=0

◆ transform() [2/2]

void flutter::DlCanvasDelegate::transform ( const SkMatrix matrix)
inlineoverride

Definition at line 113 of file layer_state_stack.cc.

113 {
114 canvas_->Transform(matrix);
115 }
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258

◆ translate()

void flutter::DlCanvasDelegate::translate ( SkScalar  tx,
SkScalar  ty 
)
inlineoverride

Definition at line 109 of file layer_state_stack.cc.

109 {
110 canvas_->Translate(tx, ty);
111 }
virtual void Translate(SkScalar tx, SkScalar ty)=0

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