| Flutter Impeller |

Public Member Functions | List of all members
impeller::interop::DisplayListBuilder Class Referencefinal

`#include <dl_builder.h>`

Inheritance diagram for impeller::interop::DisplayListBuilder:

## Public Member Functions
| DisplayListBuilder (const ImpellerRect *rect)
| ~DisplayListBuilder () override
| DisplayListBuilder (const DisplayListBuilder &)=delete
DisplayListBuilder & | operator= (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< DisplayList > | Build ()
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (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 }

## ◆ 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 }

## ◆ 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 }
impeller::DlPath
flutter::DlPath DlPath
Definition: dl_dispatcher.h:29

References impeller::interop::Path::GetPath().

## ◆ 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 }

## ◆ 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 }
impeller::RoundRect::MakeRectRadii
static RoundRect MakeRectRadii(const Rect &rect, const RoundingRadii &radii)
Definition: round_rect.cc:9

References impeller::RoundRect::MakeRectRadii().

## ◆ 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 }

References 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 }

References 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 }

References 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 }

References 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 }

References 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 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Path::GetPath().

## ◆ 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 }

References 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 }

References 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 }

References 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 }

References impeller::interop::Path::GetPath().

## ◆ 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 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Texture::MakeImage().

## ◆ 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 }

References impeller::interop::Paint::GetPaint(), and impeller::interop::Texture::MakeImage().

## ◆ GetSaveCount()

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

Definition at line 61 of file dl_builder.cc.

61 {
62 return builder_.GetSaveCount();
63 }

## ◆ GetTransform()

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

Definition at line 45 of file dl_builder.cc.

45 {
46 return builder_.GetMatrix();
47 }

## ◆ operator=()

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

## ◆ ResetTransform()

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

Definition at line 57 of file dl_builder.cc.

57 {
58 builder_.TransformReset();
59 }

## ◆ Restore()

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

Definition at line 29 of file dl_builder.cc.

29 {
30 builder_.Restore();
31 }

## ◆ RestoreToCount()

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

Definition at line 65 of file dl_builder.cc.

65 {
66 builder_.RestoreToCount(count);
67 }

## ◆ Rotate()

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

Definition at line 37 of file dl_builder.cc.

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

References impeller::Degrees::degrees.

## ◆ Save()

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

Definition at line 16 of file dl_builder.cc.

16 {
17 builder_.Save();
18 }

## ◆ 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 }

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

## ◆ 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 }

References impeller::TSize< T >::height, 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 }

## ◆ Transform()

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

Definition at line 53 of file dl_builder.cc.

53 {
54 builder_.Transform(matrix);
55 }

## ◆ 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 }

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

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

- impeller/toolkit/interop/dl_builder.h
- impeller/toolkit/interop/dl_builder.cc