Flutter Engine
 
Loading...
Searching...
No Matches
impeller::interop::DisplayListBuilder Class Referencefinal

#include <dl_builder.h>

Inheritance diagram for impeller::interop::DisplayListBuilder:
impeller::interop::Object< DisplayListBuilder, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerDisplayListBuilder)> impeller::interop::ObjectBase

Public Member Functions

 DisplayListBuilder (const ImpellerRect *rect)
 
 ~DisplayListBuilder () override
 
 DisplayListBuilder (const DisplayListBuilder &)=delete
 
DisplayListBuilderoperator= (const DisplayListBuilder &)=delete
 
void Save ()
 
void SaveLayer (const Rect &bounds, const Paint *paint, const ImageFilter *backdrop)
 
void Restore ()
 
void Scale (Size scale)
 
void Rotate (Degrees angle)
 
void Translate (Point translation)
 
Matrix GetTransform () const
 
void SetTransform (const Matrix &matrix)
 
void Transform (const Matrix &matrix)
 
void ResetTransform ()
 
uint32_t GetSaveCount () const
 
void RestoreToCount (uint32_t count)
 
void ClipRect (const Rect &rect, flutter::DlClipOp op)
 
void ClipOval (const Rect &rect, flutter::DlClipOp op)
 
void ClipRoundedRect (const Rect &rect, const RoundingRadii &radii, flutter::DlClipOp op)
 
void ClipPath (const Path &path, flutter::DlClipOp op)
 
void DrawPaint (const Paint &paint)
 
void DrawLine (const Point &from, const Point &to, const Paint &paint)
 
void DrawDashedLine (const Point &from, const Point &to, Scalar on_length, Scalar off_length, const Paint &paint)
 
void DrawRect (const Rect &rect, const Paint &paint)
 
void DrawOval (const Rect &oval_bounds, const Paint &paint)
 
void DrawRoundedRect (const Rect &rect, const RoundingRadii &radii, const Paint &paint)
 
void DrawRoundedRectDifference (const Rect &outer_rect, const RoundingRadii &outer_radii, const Rect &inner_rect, const RoundingRadii &inner_radii, const Paint &paint)
 
void DrawPath (const Path &path, const Paint &paint)
 
void DrawTexture (const Texture &texture, const Point &point, flutter::DlImageSampling sampling, const Paint *paint)
 
void DrawTextureRect (const Texture &texture, const Rect &src_rect, const Rect &dst_rect, flutter::DlImageSampling sampling, const Paint *paint)
 
void DrawDisplayList (const DisplayList &dl, Scalar opacity)
 
void DrawParagraph (const Paragraph &paragraph, Point point)
 
void DrawShadow (const Path &path, const flutter::DlColor &color, float elevation, bool occluder_is_transparent, float device_pixel_ratio)
 
ScopedObject< DisplayListBuild ()
 
- Public Member Functions inherited from impeller::interop::ObjectBase
 ObjectBase ()=default
 
virtual ~ObjectBase ()=default
 
 ObjectBase (const ObjectBase &)=delete
 
 ObjectBase (ObjectBase &&)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
ObjectBaseoperator= (ObjectBase &&)=delete
 
void Retain ()
 
void Release ()
 
uint64_t GetRefCountForTests () const
 

Additional Inherited Members

- Public Types inherited from impeller::interop::Object< DisplayListBuilder, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerDisplayListBuilder)>
using InteropClass = DisplayListBuilder
 
using InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerDisplayListBuilder)
 
- Static Public Member Functions inherited from impeller::interop::ObjectBase
static void SafeRetain (void *ptr)
 
static void SafeRelease (void *ptr)
 

Detailed Description

Definition at line 24 of file dl_builder.h.

Constructor & Destructor Documentation

◆ DisplayListBuilder() [1/2]

impeller::interop::DisplayListBuilder::DisplayListBuilder ( const ImpellerRect rect)
explicit

Definition at line 11 of file dl_builder.cc.

12 : builder_(rect) {}

◆ ~DisplayListBuilder()

impeller::interop::DisplayListBuilder::~DisplayListBuilder ( )
overridedefault

◆ DisplayListBuilder() [2/2]

impeller::interop::DisplayListBuilder::DisplayListBuilder ( const DisplayListBuilder )
delete

Member Function Documentation

◆ Build()

ScopedObject< DisplayList > impeller::interop::DisplayListBuilder::Build ( )

Definition at line 142 of file dl_builder.cc.

142 {
143 return Create<DisplayList>(builder_.Build());
144}
sk_sp< DisplayList > Build()
Definition dl_builder.cc:66

References flutter::DisplayListBuilder::Build().

◆ ClipOval()

void impeller::interop::DisplayListBuilder::ClipOval ( const Rect rect,
flutter::DlClipOp  op 
)

Definition at line 73 of file dl_builder.cc.

73 {
74 builder_.ClipOval(rect, op);
75}
void ClipOval(const DlRect &bounds, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override

References flutter::DisplayListBuilder::ClipOval().

◆ ClipPath()

void impeller::interop::DisplayListBuilder::ClipPath ( const Path path,
flutter::DlClipOp  op 
)

Definition at line 83 of file dl_builder.cc.

83 {
84 builder_.ClipPath(flutter::DlPath(path.GetPath()), op);
85}
void ClipPath(const DlPath &path, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override
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 switch_defs.h:52

References flutter::DisplayListBuilder::ClipPath().

◆ ClipRect()

void impeller::interop::DisplayListBuilder::ClipRect ( const Rect rect,
flutter::DlClipOp  op 
)

Definition at line 69 of file dl_builder.cc.

69 {
70 builder_.ClipRect(rect, op);
71}
void ClipRect(const DlRect &rect, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override

References flutter::DisplayListBuilder::ClipRect().

◆ ClipRoundedRect()

void impeller::interop::DisplayListBuilder::ClipRoundedRect ( const Rect rect,
const RoundingRadii radii,
flutter::DlClipOp  op 
)

Definition at line 77 of file dl_builder.cc.

79 {
80 builder_.ClipRoundRect(RoundRect::MakeRectRadii(rect, radii), op);
81}
void ClipRoundRect(const DlRoundRect &rrect, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override
static RoundRect MakeRectRadii(const Rect &rect, const RoundingRadii &radii)
Definition round_rect.cc:9

References flutter::DisplayListBuilder::ClipRoundRect(), and impeller::RoundRect::MakeRectRadii().

Referenced by operator=().

◆ DrawDashedLine()

void impeller::interop::DisplayListBuilder::DrawDashedLine ( const Point from,
const Point to,
Scalar  on_length,
Scalar  off_length,
const Paint paint 
)

Definition at line 129 of file dl_builder.cc.

133 {
134 builder_.DrawDashedLine(from, //
135 to, //
136 on_length, //
137 off_length, //
138 paint.GetPaint() //
139 );
140}
void DrawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawDashedLine(), and impeller::interop::Paint::GetPaint().

◆ DrawDisplayList()

void impeller::interop::DisplayListBuilder::DrawDisplayList ( const DisplayList dl,
Scalar  opacity 
)

Definition at line 146 of file dl_builder.cc.

147 {
148 builder_.DrawDisplayList(dl.GetDisplayList(), opacity);
149}
void DrawDisplayList(const sk_sp< DisplayList > display_list, DlScalar opacity=SK_Scalar1) override

References flutter::DisplayListBuilder::DrawDisplayList(), and impeller::interop::DisplayList::GetDisplayList().

◆ DrawLine()

void impeller::interop::DisplayListBuilder::DrawLine ( const Point from,
const Point to,
const Paint paint 
)

Definition at line 123 of file dl_builder.cc.

125 {
126 builder_.DrawLine(from, to, paint.GetPaint());
127}
void DrawLine(const DlPoint &p0, const DlPoint &p1, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawLine(), and impeller::interop::Paint::GetPaint().

◆ DrawOval()

void impeller::interop::DisplayListBuilder::DrawOval ( const Rect oval_bounds,
const Paint paint 
)

Definition at line 91 of file dl_builder.cc.

91 {
92 builder_.DrawOval(oval_bounds, paint.GetPaint());
93}
void DrawOval(const DlRect &bounds, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawOval(), and impeller::interop::Paint::GetPaint().

◆ DrawPaint()

void impeller::interop::DisplayListBuilder::DrawPaint ( const Paint paint)

Definition at line 119 of file dl_builder.cc.

119 {
120 builder_.DrawPaint(paint.GetPaint());
121}
void DrawPaint(const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawPaint(), and impeller::interop::Paint::GetPaint().

◆ DrawParagraph()

void impeller::interop::DisplayListBuilder::DrawParagraph ( const Paragraph paragraph,
Point  point 
)

Definition at line 175 of file dl_builder.cc.

176 {
177 const auto& handle = paragraph.GetHandle();
178 if (!handle) {
179 return;
180 }
181 handle->Paint(&builder_, point.x, point.y);
182}

References impeller::interop::Paragraph::GetHandle(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

◆ DrawPath()

void impeller::interop::DisplayListBuilder::DrawPath ( const Path path,
const Paint paint 
)

Definition at line 115 of file dl_builder.cc.

115 {
116 builder_.DrawPath(flutter::DlPath(path.GetPath()), paint.GetPaint());
117}
void DrawPath(const DlPath &path, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawPath(), and impeller::interop::Paint::GetPaint().

◆ DrawRect()

void impeller::interop::DisplayListBuilder::DrawRect ( const Rect rect,
const Paint paint 
)

Definition at line 87 of file dl_builder.cc.

87 {
88 builder_.DrawRect(rect, paint.GetPaint());
89}
void DrawRect(const DlRect &rect, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawRect(), and impeller::interop::Paint::GetPaint().

◆ DrawRoundedRect()

void impeller::interop::DisplayListBuilder::DrawRoundedRect ( const Rect rect,
const RoundingRadii radii,
const Paint paint 
)

Definition at line 95 of file dl_builder.cc.

97 {
98 builder_.DrawRoundRect(RoundRect::MakeRectRadii(rect, radii),
99 paint.GetPaint());
100}
void DrawRoundRect(const DlRoundRect &rrect, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawRoundRect(), impeller::interop::Paint::GetPaint(), and impeller::RoundRect::MakeRectRadii().

◆ DrawRoundedRectDifference()

void impeller::interop::DisplayListBuilder::DrawRoundedRectDifference ( const Rect outer_rect,
const RoundingRadii outer_radii,
const Rect inner_rect,
const RoundingRadii inner_radii,
const Paint paint 
)

Definition at line 102 of file dl_builder.cc.

107 {
108 builder_.DrawDiffRoundRect(
109 RoundRect::MakeRectRadii(outer_rect, outer_radii), //
110 RoundRect::MakeRectRadii(inner_rect, inner_radii), //
111 paint.GetPaint() //
112 );
113}
void DrawDiffRoundRect(const DlRoundRect &outer, const DlRoundRect &inner, const DlPaint &paint) override

References flutter::DisplayListBuilder::DrawDiffRoundRect(), impeller::interop::Paint::GetPaint(), and impeller::RoundRect::MakeRectRadii().

◆ DrawShadow()

void impeller::interop::DisplayListBuilder::DrawShadow ( const Path path,
const flutter::DlColor color,
float  elevation,
bool  occluder_is_transparent,
float  device_pixel_ratio 
)

Definition at line 184 of file dl_builder.cc.

188 {
189 builder_.DrawShadow(flutter::DlPath(path.GetPath()), // path
190 color, // shadow color
191 elevation, // elevation
192 occluder_is_transparent, // occluder transparency
193 device_pixel_ratio // dpr
194 );
195}
void DrawShadow(const DlPath &path, const DlColor color, const DlScalar elevation, bool transparent_occluder, DlScalar dpr) override
Draws the shadow of the given |path| rendered in the provided |color| (which is only consulted for it...

References flutter::DisplayListBuilder::DrawShadow().

◆ DrawTexture()

void impeller::interop::DisplayListBuilder::DrawTexture ( const Texture texture,
const Point point,
flutter::DlImageSampling  sampling,
const Paint paint 
)

Definition at line 151 of file dl_builder.cc.

154 {
155 builder_.DrawImage(texture.MakeImage(), //
156 point, //
157 sampling, //
158 paint == nullptr ? nullptr : &paint->GetPaint() //
159 );
160}
void DrawImage(const sk_sp< DlImage > &image, const DlPoint &point, DlImageSampling sampling, const DlPaint *paint=nullptr) override
FlTexture * texture

References flutter::DisplayListBuilder::DrawImage(), impeller::interop::Paint::GetPaint(), and texture.

◆ DrawTextureRect()

void impeller::interop::DisplayListBuilder::DrawTextureRect ( const Texture texture,
const Rect src_rect,
const Rect dst_rect,
flutter::DlImageSampling  sampling,
const Paint paint 
)

Definition at line 162 of file dl_builder.cc.

166 {
167 builder_.DrawImageRect(texture.MakeImage(), //
168 src_rect, //
169 dst_rect, //
170 sampling, //
171 paint == nullptr ? nullptr : &paint->GetPaint() //
172 );
173}
void DrawImageRect(const sk_sp< DlImage > &image, const DlRect &src, const DlRect &dst, DlImageSampling sampling, const DlPaint *paint=nullptr, DlSrcRectConstraint constraint=DlSrcRectConstraint::kFast) override

References flutter::DisplayListBuilder::DrawImageRect(), impeller::interop::Paint::GetPaint(), and texture.

◆ GetSaveCount()

uint32_t impeller::interop::DisplayListBuilder::GetSaveCount ( ) const

Definition at line 61 of file dl_builder.cc.

61 {
62 return builder_.GetSaveCount();
63}
int GetSaveCount() const override
Definition dl_builder.h:62

References flutter::DisplayListBuilder::GetSaveCount().

◆ GetTransform()

Matrix impeller::interop::DisplayListBuilder::GetTransform ( ) const

Definition at line 45 of file dl_builder.cc.

45 {
46 return builder_.GetMatrix();
47}
DlMatrix GetMatrix() const override
Definition dl_builder.h:102

References flutter::DisplayListBuilder::GetMatrix().

◆ operator=()

DisplayListBuilder & impeller::interop::DisplayListBuilder::operator= ( const DisplayListBuilder )
delete

References ClipRoundedRect().

◆ ResetTransform()

void impeller::interop::DisplayListBuilder::ResetTransform ( )

Definition at line 57 of file dl_builder.cc.

57 {
58 builder_.TransformReset();
59}
void TransformReset() override

References flutter::DisplayListBuilder::TransformReset().

◆ Restore()

void impeller::interop::DisplayListBuilder::Restore ( )

Definition at line 29 of file dl_builder.cc.

29 {
30 builder_.Restore();
31}

References flutter::DisplayListBuilder::Restore().

◆ RestoreToCount()

void impeller::interop::DisplayListBuilder::RestoreToCount ( uint32_t  count)

Definition at line 65 of file dl_builder.cc.

65 {
66 builder_.RestoreToCount(count);
67}
void RestoreToCount(int restore_count) override

References flutter::DisplayListBuilder::RestoreToCount().

◆ Rotate()

void impeller::interop::DisplayListBuilder::Rotate ( Degrees  angle)

Definition at line 37 of file dl_builder.cc.

37 {
38 builder_.Rotate(angle.degrees);
39}
void Rotate(DlScalar degrees) override

References impeller::Degrees::degrees, and flutter::DisplayListBuilder::Rotate().

◆ Save()

void impeller::interop::DisplayListBuilder::Save ( )

Definition at line 16 of file dl_builder.cc.

16 {
17 builder_.Save();
18}

References flutter::DisplayListBuilder::Save().

◆ SaveLayer()

void impeller::interop::DisplayListBuilder::SaveLayer ( const Rect bounds,
const Paint paint,
const ImageFilter backdrop 
)

Definition at line 20 of file dl_builder.cc.

22 {
23 builder_.SaveLayer(
24 bounds, //
25 paint == nullptr ? nullptr : &paint->GetPaint(), //
26 backdrop == nullptr ? nullptr : backdrop->GetImageFilter().get());
27}
void SaveLayer(const std::optional< DlRect > &bounds, const DlPaint *paint=nullptr, const DlImageFilter *backdrop=nullptr, std::optional< int64_t > backdrop_id=std::nullopt) override

References impeller::interop::ImageFilter::GetImageFilter(), impeller::interop::Paint::GetPaint(), and flutter::DisplayListBuilder::SaveLayer().

◆ Scale()

void impeller::interop::DisplayListBuilder::Scale ( Size  scale)

Definition at line 33 of file dl_builder.cc.

33 {
34 builder_.Scale(scale.width, scale.height);
35}
void Scale(DlScalar sx, DlScalar sy) override

References impeller::TSize< T >::height, flutter::DisplayListBuilder::Scale(), and impeller::TSize< T >::width.

◆ SetTransform()

void impeller::interop::DisplayListBuilder::SetTransform ( const Matrix matrix)

Definition at line 49 of file dl_builder.cc.

49 {
50 builder_.SetTransform(matrix);
51}
void SetTransform(const DlMatrix &matrix) override
Definition dl_builder.h:93

References flutter::DisplayListBuilder::SetTransform().

◆ Transform()

void impeller::interop::DisplayListBuilder::Transform ( const Matrix matrix)

Definition at line 53 of file dl_builder.cc.

53 {
54 builder_.Transform(matrix);
55}
void Transform(const DlMatrix &matrix) override

References flutter::DisplayListBuilder::Transform().

◆ Translate()

void impeller::interop::DisplayListBuilder::Translate ( Point  translation)

Definition at line 41 of file dl_builder.cc.

41 {
42 builder_.Translate(translation.x, translation.y);
43}
void Translate(DlScalar tx, DlScalar ty) override

References flutter::DisplayListBuilder::Translate(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.


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