| Flutter Impeller |

dl_dispatcher.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_DISPLAY_LIST_DL_DISPATCHER_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_DL_DISPATCHER_H_
7
8 #include <memory>
9
10 #include "flutter/display_list/dl_op_receiver.h"
11 #include "flutter/display_list/geometry/dl_geometry_types.h"
12 #include "flutter/display_list/geometry/dl_path.h"
13 #include "flutter/display_list/utils/dl_receiver_utils.h"
14 #include "fml/logging.h"
15 #include "impeller/display_list/aiks_context.h"
16 #include "impeller/display_list/canvas.h"
17 #include "impeller/display_list/paint.h"
18 #include "impeller/entity/contents/content_context.h"
19 #include "impeller/geometry/rect.h"
20
21 namespace impeller {
22
23 using DlScalar = flutter::DlScalar;
24 using DlPoint = flutter::DlPoint;
25 using DlRect = flutter::DlRect;
26 using DlIRect = flutter::DlIRect;
27 using DlRoundRect = flutter::DlRoundRect;
28 using DlRoundSuperellipse = flutter::DlRoundSuperellipse;
29 using DlPath = flutter::DlPath;
30
31 class DlDispatcherBase : public flutter::DlOpReceiver {
32 public:
33 // |flutter::DlOpReceiver|
34 void setAntiAlias(bool aa) override;
35
36 // |flutter::DlOpReceiver|
37 void setDrawStyle(flutter::DlDrawStyle style) override;
38
39 // |flutter::DlOpReceiver|
40 void setColor(flutter::DlColor color) override;
41
42 // |flutter::DlOpReceiver|
43 void setStrokeWidth(DlScalar width) override;
44
45 // |flutter::DlOpReceiver|
46 void setStrokeMiter(DlScalar limit) override;
47
48 // |flutter::DlOpReceiver|
49 void setStrokeCap(flutter::DlStrokeCap cap) override;
50
51 // |flutter::DlOpReceiver|
52 void setStrokeJoin(flutter::DlStrokeJoin join) override;
53
54 // |flutter::DlOpReceiver|
55 void setColorSource(const flutter::DlColorSource* source) override;
56
57 // |flutter::DlOpReceiver|
58 void setColorFilter(const flutter::DlColorFilter* filter) override;
59
60 // |flutter::DlOpReceiver|
61 void setInvertColors(bool invert) override;
62
63 // |flutter::DlOpReceiver|
64 void setBlendMode(flutter::DlBlendMode mode) override;
65
66 // |flutter::DlOpReceiver|
67 void setMaskFilter(const flutter::DlMaskFilter* filter) override;
68
69 // |flutter::DlOpReceiver|
70 void setImageFilter(const flutter::DlImageFilter* filter) override;
71
72 // |flutter::DlOpReceiver|
73 void save(uint32_t total_content_depth) override;
74
75 // |flutter::DlOpReceiver|
76 void saveLayer(const DlRect& bounds,
77 const flutter::SaveLayerOptions& options,
78 uint32_t total_content_depth,
79 flutter::DlBlendMode max_content_mode,
80 const flutter::DlImageFilter* backdrop,
81 std::optional<int64_t> backdrop_id) override;
82
83 // |flutter::DlOpReceiver|
84 void restore() override;
85
86 // |flutter::DlOpReceiver|
87 void translate(DlScalar tx, DlScalar ty) override;
88
89 // |flutter::DlOpReceiver|
90 void scale(DlScalar sx, DlScalar sy) override;
91
92 // |flutter::DlOpReceiver|
93 void rotate(DlScalar degrees) override;
94
95 // |flutter::DlOpReceiver|
96 void skew(DlScalar sx, DlScalar sy) override;
97
98 // |flutter::DlOpReceiver|
99 void transform2DAffine(DlScalar mxx,
100 DlScalar mxy,
101 DlScalar mxt,
102 DlScalar myx,
103 DlScalar myy,
104 DlScalar myt) override;
105
106 // |flutter::DlOpReceiver|
107 void transformFullPerspective(DlScalar mxx,
108 DlScalar mxy,
109 DlScalar mxz,
110 DlScalar mxt,
111 DlScalar myx,
112 DlScalar myy,
113 DlScalar myz,
114 DlScalar myt,
115 DlScalar mzx,
116 DlScalar mzy,
117 DlScalar mzz,
118 DlScalar mzt,
119 DlScalar mwx,
120 DlScalar mwy,
121 DlScalar mwz,
122 DlScalar mwt) override;
123
124 // |flutter::DlOpReceiver|
125 void transformReset() override;
126
127 // |flutter::DlOpReceiver|
128 void clipRect(const DlRect& rect,
129 flutter::DlClipOp clip_op,
130 bool is_aa) override;
131
132 // |flutter::DlOpReceiver|
133 void clipOval(const DlRect& bounds,
134 flutter::DlClipOp clip_op,
135 bool is_aa) override;
136
137 // |flutter::DlOpReceiver|
138 void clipRoundRect(const DlRoundRect& rrect,
139 flutter::DlClipOp clip_op,
140 bool is_aa) override;
141
142 // |flutter::DlOpReceiver|
143 void clipRoundSuperellipse(const DlRoundSuperellipse& rse,
144 flutter::DlClipOp clip_op,
145 bool is_aa) override;
146
147 // |flutter::DlOpReceiver|
148 void clipPath(const DlPath& path,
149 flutter::DlClipOp clip_op,
150 bool is_aa) override;
151
152 // |flutter::DlOpReceiver|
153 void drawColor(flutter::DlColor color, flutter::DlBlendMode mode) override;
154
155 // |flutter::DlOpReceiver|
156 void drawPaint() override;
157
158 // |flutter::DlOpReceiver|
159 void drawLine(const DlPoint& p0, const DlPoint& p1) override;
160
161 // |flutter::DlOpReceiver|
162 void drawDashedLine(const DlPoint& p0,
163 const DlPoint& p1,
164 DlScalar on_length,
165 DlScalar off_length) override;
166
167 // |flutter::DlOpReceiver|
168 void drawRect(const DlRect& rect) override;
169
170 // |flutter::DlOpReceiver|
171 void drawOval(const DlRect& bounds) override;
172
173 // |flutter::DlOpReceiver|
174 void drawCircle(const DlPoint& center, DlScalar radius) override;
175
176 // |flutter::DlOpReceiver|
177 void drawRoundRect(const DlRoundRect& rrect) override;
178
179 // |flutter::DlOpReceiver|
180 void drawDiffRoundRect(const DlRoundRect& outer,
181 const DlRoundRect& inner) override;
182
183 // |flutter::DlOpReceiver|
184 void drawRoundSuperellipse(const DlRoundSuperellipse& rse) override;
185
186 // |flutter::DlOpReceiver|
187 void drawPath(const DlPath& path) override;
188
189 // |flutter::DlOpReceiver|
190 void drawArc(const DlRect& oval_bounds,
191 DlScalar start_degrees,
192 DlScalar sweep_degrees,
193 bool use_center) override;
194
195 // |flutter::DlOpReceiver|
196 void drawPoints(flutter::DlPointMode mode,
197 uint32_t count,
198 const DlPoint points[]) override;
199
200 // |flutter::DlOpReceiver|
201 void drawVertices(const std::shared_ptr<flutter::DlVertices>& vertices,
202 flutter::DlBlendMode dl_mode) override;
203
204 // |flutter::DlOpReceiver|
205 void drawImage(const sk_sp<flutter::DlImage> image,
206 const DlPoint& point,
207 flutter::DlImageSampling sampling,
208 bool render_with_attributes) override;
209
210 // |flutter::DlOpReceiver|
211 void drawImageRect(const sk_sp<flutter::DlImage> image,
212 const DlRect& src,
213 const DlRect& dst,
214 flutter::DlImageSampling sampling,
215 bool render_with_attributes,
216 flutter::DlSrcRectConstraint constraint) override;
217
218 // |flutter::DlOpReceiver|
219 void drawImageNine(const sk_sp<flutter::DlImage> image,
220 const DlIRect& center,
221 const DlRect& dst,
222 flutter::DlFilterMode filter,
223 bool render_with_attributes) override;
224
225 // |flutter::DlOpReceiver|
226 void drawAtlas(const sk_sp<flutter::DlImage> atlas,
227 const RSTransform xform[],
228 const DlRect tex[],
229 const flutter::DlColor colors[],
230 int count,
231 flutter::DlBlendMode mode,
232 flutter::DlImageSampling sampling,
233 const DlRect* cull_rect,
234 bool render_with_attributes) override;
235
236 // |flutter::DlOpReceiver|
237 void drawDisplayList(const sk_sp<flutter::DisplayList> display_list,
238 DlScalar opacity) override;
239
240 // |flutter::DlOpReceiver|
241 void drawText(const std::shared_ptr<flutter::DlText>& text,
242 DlScalar x,
243 DlScalar y) override;
244
245 // |flutter::DlOpReceiver|
246 void drawShadow(const DlPath& path,
247 const flutter::DlColor color,
248 const DlScalar elevation,
249 bool transparent_occluder,
250 DlScalar dpr) override;
251
252 virtual Canvas& GetCanvas() = 0;
253
254 protected:
255 Paint paint_;
256 Matrix initial_matrix_;
257
258 static void SimplifyOrDrawPath(Canvas& canvas,
259 const DlPath& cache,
260 const Paint& paint);
261 };
262
263 class CanvasDlDispatcher : public DlDispatcherBase {
264 public:
265 CanvasDlDispatcher(ContentContext& renderer,
266 RenderTarget& render_target,
267 bool is_onscreen,
268 bool has_root_backdrop_filter,
269 flutter::DlBlendMode max_root_blend_mode,
270 IRect32 cull_rect);
271
272 ~CanvasDlDispatcher() = default;
273
274 void SetBackdropData(std::unordered_map<int64_t, BackdropData> backdrop,
275 size_t backdrop_count);
276
277 // |flutter::DlOpReceiver|
278 void save() override {
279 // This dispatcher should never be used with the save() variant
280 // that does not include the content_depth parameter.
281 FML_UNREACHABLE();
282 }
283 using DlDispatcherBase::save;
284
285 // |flutter::DlOpReceiver|
286 void saveLayer(const DlRect& bounds,
287 const flutter::SaveLayerOptions options,
288 const flutter::DlImageFilter* backdrop,
289 std::optional<int64_t> backdrop_id) override {
290 // This dispatcher should never be used with the saveLayer() variant
291 // that does not include the content_depth parameter.
292 FML_UNREACHABLE();
293 }
294 using DlDispatcherBase::saveLayer;
295
296 void FinishRecording() { canvas_.EndReplay(); }
297
298 // |flutter::DlOpReceiver|
299 void drawVertices(const std::shared_ptr<flutter::DlVertices>& vertices,
300 flutter::DlBlendMode dl_mode) override;
301
302 private:
303 Canvas canvas_;
304 const ContentContext& renderer_;
305
306 Canvas& GetCanvas() override;
307 };
308
309 /// Performs a first pass over the display list to collect infomation.
310 /// Collects things like text frames and backdrop filters.
311 class FirstPassDispatcher : public flutter::IgnoreAttributeDispatchHelper,
312 public flutter::IgnoreClipDispatchHelper,
313 public flutter::IgnoreDrawDispatchHelper {
314 public:
315 FirstPassDispatcher(const ContentContext& renderer,
316 const Matrix& initial_matrix,
317 const Rect cull_rect);
318
319 ~FirstPassDispatcher();
320
321 void save() override;
322
323 void saveLayer(const DlRect& bounds,
324 const flutter::SaveLayerOptions options,
325 const flutter::DlImageFilter* backdrop,
326 std::optional<int64_t> backdrop_id) override;
327
328 void restore() override;
329
330 void translate(DlScalar tx, DlScalar ty) override;
331
332 void scale(DlScalar sx, DlScalar sy) override;
333
334 void rotate(DlScalar degrees) override;
335
336 void skew(DlScalar sx, DlScalar sy) override;
337
338 // clang-format off
339 // 2x3 2D affine subset of a 4x4 transform in row major order
340 void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt,
341 DlScalar myx, DlScalar myy, DlScalar myt) override;
342 // clang-format on
343
344 // clang-format off
345 // full 4x4 transform in row major order
346 void transformFullPerspective(
347 DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt,
348 DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt,
349 DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt,
350 DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override;
351 // clang-format on
352
353 void transformReset() override;
354
355 void drawText(const std::shared_ptr<flutter::DlText>& text,
356 DlScalar x,
357 DlScalar y) override;
358
359 void drawDisplayList(const sk_sp<flutter::DisplayList> display_list,
360 DlScalar opacity) override;
361
362 // |flutter::DlOpReceiver|
363 void setDrawStyle(flutter::DlDrawStyle style) override;
364
365 // |flutter::DlOpReceiver|
366 void setColor(flutter::DlColor color) override;
367
368 // |flutter::DlOpReceiver|
369 void setStrokeWidth(DlScalar width) override;
370
371 // |flutter::DlOpReceiver|
372 void setStrokeMiter(DlScalar limit) override;
373
374 // |flutter::DlOpReceiver|
375 void setStrokeCap(flutter::DlStrokeCap cap) override;
376
377 // |flutter::DlOpReceiver|
378 void setStrokeJoin(flutter::DlStrokeJoin join) override;
379
380 // |flutter::DlOpReceiver|
381 void setImageFilter(const flutter::DlImageFilter* filter) override;
382
383 std::pair<std::unordered_map<int64_t, BackdropData>, size_t>
384 TakeBackdropData();
385
386 private:
387 const Rect GetCurrentLocalCullingBounds() const;
388
389 const ContentContext& renderer_;
390 Matrix matrix_;
391 std::vector<Matrix> stack_;
392 std::unordered_map<int64_t, BackdropData> backdrop_data_;
393 // note: cull rects are always in the global coordinate space.
394 std::vector<Rect> cull_rect_state_;
395 bool has_image_filter_ = false;
396 size_t backdrop_count_ = 0;
397 Paint paint_;
398 };
399
400 /// Render the provided display list to a texture with the given size.
401 std::shared_ptr<Texture> DisplayListToTexture(
402 const sk_sp<flutter::DisplayList>& display_list,
403 ISize size,
404 AiksContext& context,
405 bool reset_host_buffer = true,
406 bool generate_mips = false,
407 std::optional<PixelFormat> target_pixel_format = std::nullopt);
408
409 /// @brief Render the provided display list to the render target.
410 ///
411 /// If [is_onscreen] is true, then the onscreen command buffer will be
412 /// submitted via Context::SubmitOnscreen.
413 bool RenderToTarget(ContentContext& context,
414 RenderTarget render_target,
415 const sk_sp<flutter::DisplayList>& display_list,
416 Rect cull_rect,
417 bool reset_host_buffer,
418 bool is_onscreen = true);
419
420 } // namespace impeller
421
422 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_DL_DISPATCHER_H_
aiks_context.h
use_center
bool use_center
Definition: aiks_dl_basic_unittests.cc:925
canvas.h
impeller::AiksContext
Definition: aiks_context.h:20
impeller::CanvasDlDispatcher
Definition: dl_dispatcher.h:263
impeller::CanvasDlDispatcher::FinishRecording
void FinishRecording()
Definition: dl_dispatcher.h:296
impeller::CanvasDlDispatcher::saveLayer
void saveLayer(const DlRect &bounds, const flutter::SaveLayerOptions options, const flutter::DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
Definition: dl_dispatcher.h:286
impeller::CanvasDlDispatcher::CanvasDlDispatcher
CanvasDlDispatcher(ContentContext &renderer, RenderTarget &render_target, bool is_onscreen, bool has_root_backdrop_filter, flutter::DlBlendMode max_root_blend_mode, IRect32 cull_rect)
Definition: dl_dispatcher.cc:930
impeller::CanvasDlDispatcher::save
void save() override
Definition: dl_dispatcher.h:278
impeller::CanvasDlDispatcher::drawVertices
void drawVertices(const std::shared_ptr< flutter::DlVertices > &vertices, flutter::DlBlendMode dl_mode) override
Definition: dl_dispatcher.cc:948
impeller::CanvasDlDispatcher::SetBackdropData
void SetBackdropData(std::unordered_map< int64_t, BackdropData > backdrop, size_t backdrop_count)
Definition: dl_dispatcher.cc:958
impeller::CanvasDlDispatcher::~CanvasDlDispatcher
~CanvasDlDispatcher()=default
impeller::Canvas
Definition: canvas.h:118
impeller::Canvas::EndReplay
void EndReplay()
Definition: canvas.cc:2291
impeller::ContentContext
Definition: content_context.h:122
impeller::DlDispatcherBase
Definition: dl_dispatcher.h:31
impeller::DlDispatcherBase::drawLine
void drawLine(const DlPoint &p0, const DlPoint &p1) override
Definition: dl_dispatcher.cc:530
impeller::DlDispatcherBase::drawText
void drawText(const std::shared_ptr< flutter::DlText > &text, DlScalar x, DlScalar y) override
Definition: dl_dispatcher.cc:843
impeller::DlDispatcherBase::drawAtlas
void drawAtlas(const sk_sp< flutter::DlImage > atlas, const RSTransform xform[], const DlRect tex[], const flutter::DlColor colors[], int count, flutter::DlBlendMode mode, flutter::DlImageSampling sampling, const DlRect *cull_rect, bool render_with_attributes) override
Definition: dl_dispatcher.cc:750
impeller::DlDispatcherBase::drawPoints
void drawPoints(flutter::DlPointMode mode, uint32_t count, const DlPoint points[]) override
Definition: dl_dispatcher.cc:642
impeller::DlDispatcherBase::GetCanvas
virtual Canvas & GetCanvas()=0
impeller::DlDispatcherBase::drawDashedLine
void drawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
Definition: dl_dispatcher.cc:537
impeller::DlDispatcherBase::drawOval
void drawOval(const DlRect &bounds) override
Definition: dl_dispatcher.cc:554
impeller::DlDispatcherBase::setImageFilter
void setImageFilter(const flutter::DlImageFilter *filter) override
Definition: dl_dispatcher.cc:294
impeller::DlDispatcherBase::drawPath
void drawPath(const DlPath &path) override
Definition: dl_dispatcher.cc:590
impeller::DlDispatcherBase::setStrokeCap
void setStrokeCap(flutter::DlStrokeCap cap) override
Definition: dl_dispatcher.cc:196
impeller::DlDispatcherBase::clipOval
void clipOval(const DlRect &bounds, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:434
impeller::DlDispatcherBase::drawRoundSuperellipse
void drawRoundSuperellipse(const DlRoundSuperellipse &rse) override
Definition: dl_dispatcher.cc:583
impeller::DlDispatcherBase::clipRoundRect
void clipRoundRect(const DlRoundRect &rrect, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:444
impeller::DlDispatcherBase::initial_matrix_
Matrix initial_matrix_
Definition: dl_dispatcher.h:256
impeller::DlDispatcherBase::skew
void skew(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:363
impeller::DlDispatcherBase::clipRect
void clipRect(const DlRect &rect, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:424
impeller::DlDispatcherBase::setAntiAlias
void setAntiAlias(bool aa) override
Definition: dl_dispatcher.cc:148
impeller::DlDispatcherBase::transformFullPerspective
void transformFullPerspective(DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt, DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt, DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override
Definition: dl_dispatcher.cc:387
impeller::DlDispatcherBase::setStrokeWidth
void setStrokeWidth(DlScalar width) override
Definition: dl_dispatcher.cc:182
impeller::DlDispatcherBase::paint_
Paint paint_
Definition: dl_dispatcher.h:255
impeller::DlDispatcherBase::drawDiffRoundRect
void drawDiffRoundRect(const DlRoundRect &outer, const DlRoundRect &inner) override
Definition: dl_dispatcher.cc:575
impeller::DlDispatcherBase::drawRoundRect
void drawRoundRect(const DlRoundRect &rrect) override
Definition: dl_dispatcher.cc:568
impeller::DlDispatcherBase::drawPaint
void drawPaint() override
Definition: dl_dispatcher.cc:523
impeller::DlDispatcherBase::setStrokeJoin
void setStrokeJoin(flutter::DlStrokeJoin join) override
Definition: dl_dispatcher.cc:213
impeller::DlDispatcherBase::rotate
void rotate(DlScalar degrees) override
Definition: dl_dispatcher.cc:356
impeller::DlDispatcherBase::setColorFilter
void setColorFilter(const flutter::DlColorFilter *filter) override
Definition: dl_dispatcher.cc:237
impeller::DlDispatcherBase::scale
void scale(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:349
impeller::DlDispatcherBase::setDrawStyle
void setDrawStyle(flutter::DlDrawStyle style) override
Definition: dl_dispatcher.cc:168
impeller::DlDispatcherBase::drawShadow
void drawShadow(const DlPath &path, const flutter::DlColor color, const DlScalar elevation, bool transparent_occluder, DlScalar dpr) override
Definition: dl_dispatcher.cc:860
impeller::DlDispatcherBase::drawImage
void drawImage(const sk_sp< flutter::DlImage > image, const DlPoint &point, flutter::DlImageSampling sampling, bool render_with_attributes) override
Definition: dl_dispatcher.cc:686
impeller::DlDispatcherBase::clipPath
void clipPath(const DlPath &path, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:485
impeller::DlDispatcherBase::drawImageRect
void drawImageRect(const sk_sp< flutter::DlImage > image, const DlRect &src, const DlRect &dst, flutter::DlImageSampling sampling, bool render_with_attributes, flutter::DlSrcRectConstraint constraint) override
Definition: dl_dispatcher.cc:715
impeller::DlDispatcherBase::clipRoundSuperellipse
void clipRoundSuperellipse(const DlRoundSuperellipse &rse, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:466
impeller::DlDispatcherBase::drawArc
void drawArc(const DlRect &oval_bounds, DlScalar start_degrees, DlScalar sweep_degrees, bool use_center) override
Definition: dl_dispatcher.cc:630
impeller::DlDispatcherBase::saveLayer
void saveLayer(const DlRect &bounds, const flutter::SaveLayerOptions &options, uint32_t total_content_depth, flutter::DlBlendMode max_content_mode, const flutter::DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
Definition: dl_dispatcher.cc:308
impeller::DlDispatcherBase::drawDisplayList
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, DlScalar opacity) override
Definition: dl_dispatcher.cc:778
impeller::DlDispatcherBase::transform2DAffine
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
Definition: dl_dispatcher.cc:371
impeller::DlDispatcherBase::setInvertColors
void setInvertColors(bool invert) override
Definition: dl_dispatcher.cc:244
impeller::DlDispatcherBase::setColor
void setColor(flutter::DlColor color) override
Definition: dl_dispatcher.cc:175
impeller::DlDispatcherBase::save
void save(uint32_t total_content_depth) override
Definition: dl_dispatcher.cc:301
impeller::DlDispatcherBase::setStrokeMiter
void setStrokeMiter(DlScalar limit) override
Definition: dl_dispatcher.cc:189
impeller::DlDispatcherBase::translate
void translate(DlScalar tx, DlScalar ty) override
Definition: dl_dispatcher.cc:342
impeller::DlDispatcherBase::drawVertices
void drawVertices(const std::shared_ptr< flutter::DlVertices > &vertices, flutter::DlBlendMode dl_mode) override
Definition: dl_dispatcher.cc:681
impeller::DlDispatcherBase::drawCircle
void drawCircle(const DlPoint &center, DlScalar radius) override
Definition: dl_dispatcher.cc:561
impeller::DlDispatcherBase::setMaskFilter
void setMaskFilter(const flutter::DlMaskFilter *filter) override
Definition: dl_dispatcher.cc:271
impeller::DlDispatcherBase::restore
void restore() override
Definition: dl_dispatcher.cc:337
impeller::DlDispatcherBase::setColorSource
void setColorSource(const flutter::DlColorSource *source) override
Definition: dl_dispatcher.cc:230
impeller::DlDispatcherBase::drawImageNine
void drawImageNine(const sk_sp< flutter::DlImage > image, const DlIRect &center, const DlRect &dst, flutter::DlFilterMode filter, bool render_with_attributes) override
Definition: dl_dispatcher.cc:734
impeller::DlDispatcherBase::transformReset
void transformReset() override
Definition: dl_dispatcher.cc:407
impeller::DlDispatcherBase::setBlendMode
void setBlendMode(flutter::DlBlendMode mode) override
Definition: dl_dispatcher.cc:251
impeller::DlDispatcherBase::drawColor
void drawColor(flutter::DlColor color, flutter::DlBlendMode mode) override
Definition: dl_dispatcher.cc:512
impeller::DlDispatcherBase::drawRect
void drawRect(const DlRect &rect) override
Definition: dl_dispatcher.cc:547
impeller::DlDispatcherBase::SimplifyOrDrawPath
static void SimplifyOrDrawPath(Canvas &canvas, const DlPath &cache, const Paint &paint)
Definition: dl_dispatcher.cc:596
impeller::FirstPassDispatcher
Definition: dl_dispatcher.h:313
impeller::FirstPassDispatcher::setColor
void setColor(flutter::DlColor color) override
Definition: dl_dispatcher.cc:1154
impeller::FirstPassDispatcher::setStrokeCap
void setStrokeCap(flutter::DlStrokeCap cap) override
Definition: dl_dispatcher.cc:1169
impeller::FirstPassDispatcher::saveLayer
void saveLayer(const DlRect &bounds, const flutter::SaveLayerOptions options, const flutter::DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
Definition: dl_dispatcher.cc:982
impeller::FirstPassDispatcher::setDrawStyle
void setDrawStyle(flutter::DlDrawStyle style) override
Definition: dl_dispatcher.cc:1149
impeller::FirstPassDispatcher::save
void save() override
Definition: dl_dispatcher.cc:977
impeller::FirstPassDispatcher::restore
void restore() override
Definition: dl_dispatcher.cc:1023
impeller::FirstPassDispatcher::TakeBackdropData
std::pair< std::unordered_map< int64_t, BackdropData >, size_t > TakeBackdropData()
Definition: dl_dispatcher.cc:1214
impeller::FirstPassDispatcher::rotate
void rotate(DlScalar degrees) override
Definition: dl_dispatcher.cc:1037
impeller::FirstPassDispatcher::setImageFilter
void setImageFilter(const flutter::DlImageFilter *filter) override
Definition: dl_dispatcher.cc:1199
impeller::FirstPassDispatcher::setStrokeMiter
void setStrokeMiter(DlScalar limit) override
Definition: dl_dispatcher.cc:1164
impeller::FirstPassDispatcher::transformFullPerspective
void transformFullPerspective(DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt, DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt, DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override
Definition: dl_dispatcher.cc:1061
impeller::FirstPassDispatcher::drawText
void drawText(const std::shared_ptr< flutter::DlText > &text, DlScalar x, DlScalar y) override
Definition: dl_dispatcher.cc:1079
impeller::FirstPassDispatcher::scale
void scale(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:1033
impeller::FirstPassDispatcher::translate
void translate(DlScalar tx, DlScalar ty) override
Definition: dl_dispatcher.cc:1029
impeller::FirstPassDispatcher::skew
void skew(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:1041
impeller::FirstPassDispatcher::FirstPassDispatcher
FirstPassDispatcher(const ContentContext &renderer, const Matrix &initial_matrix, const Rect cull_rect)
Definition: dl_dispatcher.cc:966
impeller::FirstPassDispatcher::drawDisplayList
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, DlScalar opacity) override
Definition: dl_dispatcher.cc:1120
impeller::FirstPassDispatcher::setStrokeWidth
void setStrokeWidth(DlScalar width) override
Definition: dl_dispatcher.cc:1159
impeller::FirstPassDispatcher::setStrokeJoin
void setStrokeJoin(flutter::DlStrokeJoin join) override
Definition: dl_dispatcher.cc:1184
impeller::FirstPassDispatcher::~FirstPassDispatcher
~FirstPassDispatcher()
Definition: dl_dispatcher.cc:973
impeller::FirstPassDispatcher::transformReset
void transformReset() override
Definition: dl_dispatcher.cc:1075
impeller::FirstPassDispatcher::transform2DAffine
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
Definition: dl_dispatcher.cc:1047
impeller::RenderTarget
Definition: render_target.h:38
content_context.h
paint.h
x
int32_t x
Definition: dl_golden_unittests.cc:458
impeller
Definition: allocation.cc:12
impeller::DlRect
flutter::DlRect DlRect
Definition: dl_dispatcher.h:25
impeller::DlIRect
flutter::DlIRect DlIRect
Definition: dl_dispatcher.h:26
impeller::DisplayListToTexture
std::shared_ptr< Texture > DisplayListToTexture(const sk_sp< flutter::DisplayList > &display_list, ISize size, AiksContext &context, bool reset_host_buffer, bool generate_mips, std::optional< PixelFormat > target_pixel_format)
Render the provided display list to a texture with the given size.
Definition: dl_dispatcher.cc:1220
impeller::DlRoundRect
flutter::DlRoundRect DlRoundRect
Definition: dl_dispatcher.h:27
impeller::DlPoint
flutter::DlPoint DlPoint
Definition: dl_dispatcher.h:24
impeller::DlRoundSuperellipse
flutter::DlRoundSuperellipse DlRoundSuperellipse
Definition: dl_dispatcher.h:28
impeller::DlPath
flutter::DlPath DlPath
Definition: dl_dispatcher.h:29
impeller::RenderToTarget
bool RenderToTarget(ContentContext &context, RenderTarget render_target, const sk_sp< flutter::DisplayList > &display_list, Rect cull_rect, bool reset_host_buffer, bool is_onscreen)
Render the provided display list to the render target.
Definition: dl_dispatcher.cc:1301
impeller::DlScalar
flutter::DlScalar DlScalar
Definition: dl_dispatcher.h:23
rect.h
p1
Point p1
Definition: round_superellipse_param.cc:313
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::Paint
Definition: paint.h:27
impeller::RSTransform
Definition: rstransform.h:20
impeller::TRect
Definition: rect.h:122
impeller::TSize
Definition: size.h:25
points
std::vector< Point > points
Definition: tessellator_libtess.cc:76