| 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 drawTextBlob(const sk_sp<SkTextBlob> blob,
242 DlScalar x,
243 DlScalar y) override;
244
245 // |flutter::DlOpReceiver|
246 void drawTextFrame(const std::shared_ptr<impeller::TextFrame>& text_frame,
247 DlScalar x,
248 DlScalar y) override;
249
250 // |flutter::DlOpReceiver|
251 void drawShadow(const DlPath& path,
252 const flutter::DlColor color,
253 const DlScalar elevation,
254 bool transparent_occluder,
255 DlScalar dpr) override;
256
257 virtual Canvas& GetCanvas() = 0;
258
259 protected:
260 Paint paint_;
261 Matrix initial_matrix_;
262
263 static void SimplifyOrDrawPath(Canvas& canvas,
264 const DlPath& cache,
265 const Paint& paint);
266 };
267
268 class CanvasDlDispatcher : public DlDispatcherBase {
269 public:
270 CanvasDlDispatcher(ContentContext& renderer,
271 RenderTarget& render_target,
272 bool is_onscreen,
273 bool has_root_backdrop_filter,
274 flutter::DlBlendMode max_root_blend_mode,
275 IRect cull_rect);
276
277 ~CanvasDlDispatcher() = default;
278
279 void SetBackdropData(std::unordered_map<int64_t, BackdropData> backdrop,
280 size_t backdrop_count);
281
282 // |flutter::DlOpReceiver|
283 void save() override {
284 // This dispatcher should never be used with the save() variant
285 // that does not include the content_depth parameter.
286 FML_UNREACHABLE();
287 }
288 using DlDispatcherBase::save;
289
290 // |flutter::DlOpReceiver|
291 void saveLayer(const DlRect& bounds,
292 const flutter::SaveLayerOptions options,
293 const flutter::DlImageFilter* backdrop,
294 std::optional<int64_t> backdrop_id) override {
295 // This dispatcher should never be used with the saveLayer() variant
296 // that does not include the content_depth parameter.
297 FML_UNREACHABLE();
298 }
299 using DlDispatcherBase::saveLayer;
300
301 void FinishRecording() { canvas_.EndReplay(); }
302
303 // |flutter::DlOpReceiver|
304 void drawVertices(const std::shared_ptr<flutter::DlVertices>& vertices,
305 flutter::DlBlendMode dl_mode) override;
306
307 private:
308 Canvas canvas_;
309 const ContentContext& renderer_;
310
311 Canvas& GetCanvas() override;
312 };
313
314 /// Performs a first pass over the display list to collect infomation.
315 /// Collects things like text frames and backdrop filters.
316 class FirstPassDispatcher : public flutter::IgnoreAttributeDispatchHelper,
317 public flutter::IgnoreClipDispatchHelper,
318 public flutter::IgnoreDrawDispatchHelper {
319 public:
320 FirstPassDispatcher(const ContentContext& renderer,
321 const Matrix& initial_matrix,
322 const Rect cull_rect);
323
324 ~FirstPassDispatcher();
325
326 void save() override;
327
328 void saveLayer(const DlRect& bounds,
329 const flutter::SaveLayerOptions options,
330 const flutter::DlImageFilter* backdrop,
331 std::optional<int64_t> backdrop_id) override;
332
333 void restore() override;
334
335 void translate(DlScalar tx, DlScalar ty) override;
336
337 void scale(DlScalar sx, DlScalar sy) override;
338
339 void rotate(DlScalar degrees) override;
340
341 void skew(DlScalar sx, DlScalar sy) override;
342
343 // clang-format off
344 // 2x3 2D affine subset of a 4x4 transform in row major order
345 void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt,
346 DlScalar myx, DlScalar myy, DlScalar myt) override;
347
348 // full 4x4 transform in row major order
349 void transformFullPerspective(
350 DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt,
351 DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt,
352 DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt,
353 DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override;
354
355 void transformReset() override;
356
357 void drawTextFrame(const std::shared_ptr<impeller::TextFrame>& text_frame,
358 DlScalar x,
359 DlScalar y) override;
360
361 void drawDisplayList(const sk_sp<flutter::DisplayList> display_list,
362 DlScalar opacity) override;
363
364 // |flutter::DlOpReceiver|
365 void setDrawStyle(flutter::DlDrawStyle style) override;
366
367 // |flutter::DlOpReceiver|
368 void setColor(flutter::DlColor color) override;
369
370 // |flutter::DlOpReceiver|
371 void setStrokeWidth(DlScalar width) override;
372
373 // |flutter::DlOpReceiver|
374 void setStrokeMiter(DlScalar limit) override;
375
376 // |flutter::DlOpReceiver|
377 void setStrokeCap(flutter::DlStrokeCap cap) override;
378
379 // |flutter::DlOpReceiver|
380 void setStrokeJoin(flutter::DlStrokeJoin join) override;
381
382 // |flutter::DlOpReceiver|
383 void setImageFilter(const flutter::DlImageFilter* filter) override;
384
385 std::pair<std::unordered_map<int64_t, BackdropData>, size_t> TakeBackdropData();
386
387 private:
388 const Rect GetCurrentLocalCullingBounds() const;
389
390 const ContentContext& renderer_;
391 Matrix matrix_;
392 std::vector<Matrix> stack_;
393 std::unordered_map<int64_t, BackdropData> backdrop_data_;
394 // note: cull rects are always in the global coordinate space.
395 std::vector<Rect> cull_rect_state_;
396 bool has_image_filter_ = false;
397 size_t backdrop_count_ = 0;
398 Paint paint_;
399 };
400
401 /// Render the provided display list to a texture with the given size.
402 std::shared_ptr<Texture> DisplayListToTexture(
403 const sk_sp<flutter::DisplayList>& display_list,
404 ISize size,
405 AiksContext& context,
406 bool reset_host_buffer = true,
407 bool generate_mips = false);
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, RenderTarget render_target,
414 const sk_sp<flutter::DisplayList>& display_list,
415 Rect cull_rect,
416 bool reset_host_buffer,
417 bool is_onscreen = true);
418
419 } // namespace impeller
420
421 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_DL_DISPATCHER_H_
aiks_context.h
use_center
bool use_center
Definition: aiks_dl_basic_unittests.cc:764
canvas.h
impeller::AiksContext
Definition: aiks_context.h:19
impeller::CanvasDlDispatcher
Definition: dl_dispatcher.h:268
impeller::CanvasDlDispatcher::FinishRecording
void FinishRecording()
Definition: dl_dispatcher.h:301
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:291
impeller::CanvasDlDispatcher::CanvasDlDispatcher
CanvasDlDispatcher(ContentContext &renderer, RenderTarget &render_target, bool is_onscreen, bool has_root_backdrop_filter, flutter::DlBlendMode max_root_blend_mode, IRect cull_rect)
Definition: dl_dispatcher.cc:948
impeller::CanvasDlDispatcher::save
void save() override
Definition: dl_dispatcher.h:283
impeller::CanvasDlDispatcher::drawVertices
void drawVertices(const std::shared_ptr< flutter::DlVertices > &vertices, flutter::DlBlendMode dl_mode) override
Definition: dl_dispatcher.cc:966
impeller::CanvasDlDispatcher::SetBackdropData
void SetBackdropData(std::unordered_map< int64_t, BackdropData > backdrop, size_t backdrop_count)
Definition: dl_dispatcher.cc:976
impeller::CanvasDlDispatcher::~CanvasDlDispatcher
~CanvasDlDispatcher()=default
impeller::Canvas
Definition: canvas.h:120
impeller::Canvas::EndReplay
void EndReplay()
Definition: canvas.cc:2086
impeller::ContentContext
Definition: content_context.h:138
impeller::DlDispatcherBase
Definition: dl_dispatcher.h:31
impeller::DlDispatcherBase::drawLine
void drawLine(const DlPoint &p0, const DlPoint &p1) override
Definition: dl_dispatcher.cc:543
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:763
impeller::DlDispatcherBase::drawPoints
void drawPoints(flutter::DlPointMode mode, uint32_t count, const DlPoint points[]) override
Definition: dl_dispatcher.cc:655
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:550
impeller::DlDispatcherBase::drawOval
void drawOval(const DlRect &bounds) override
Definition: dl_dispatcher.cc:567
impeller::DlDispatcherBase::setImageFilter
void setImageFilter(const flutter::DlImageFilter *filter) override
Definition: dl_dispatcher.cc:293
impeller::DlDispatcherBase::drawPath
void drawPath(const DlPath &path) override
Definition: dl_dispatcher.cc:603
impeller::DlDispatcherBase::setStrokeCap
void setStrokeCap(flutter::DlStrokeCap cap) override
Definition: dl_dispatcher.cc:195
impeller::DlDispatcherBase::clipOval
void clipOval(const DlRect &bounds, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:447
impeller::DlDispatcherBase::drawRoundSuperellipse
void drawRoundSuperellipse(const DlRoundSuperellipse &rse) override
Definition: dl_dispatcher.cc:596
impeller::DlDispatcherBase::clipRoundRect
void clipRoundRect(const DlRoundRect &rrect, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:457
impeller::DlDispatcherBase::initial_matrix_
Matrix initial_matrix_
Definition: dl_dispatcher.h:261
impeller::DlDispatcherBase::skew
void skew(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:362
impeller::DlDispatcherBase::clipRect
void clipRect(const DlRect &rect, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:437
impeller::DlDispatcherBase::setAntiAlias
void setAntiAlias(bool aa) override
Definition: dl_dispatcher.cc:147
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:388
impeller::DlDispatcherBase::setStrokeWidth
void setStrokeWidth(DlScalar width) override
Definition: dl_dispatcher.cc:181
impeller::DlDispatcherBase::paint_
Paint paint_
Definition: dl_dispatcher.h:260
impeller::DlDispatcherBase::drawDiffRoundRect
void drawDiffRoundRect(const DlRoundRect &outer, const DlRoundRect &inner) override
Definition: dl_dispatcher.cc:588
impeller::DlDispatcherBase::drawRoundRect
void drawRoundRect(const DlRoundRect &rrect) override
Definition: dl_dispatcher.cc:581
impeller::DlDispatcherBase::drawPaint
void drawPaint() override
Definition: dl_dispatcher.cc:536
impeller::DlDispatcherBase::setStrokeJoin
void setStrokeJoin(flutter::DlStrokeJoin join) override
Definition: dl_dispatcher.cc:212
impeller::DlDispatcherBase::drawTextBlob
void drawTextBlob(const sk_sp< SkTextBlob > blob, DlScalar x, DlScalar y) override
Definition: dl_dispatcher.cc:856
impeller::DlDispatcherBase::rotate
void rotate(DlScalar degrees) override
Definition: dl_dispatcher.cc:355
impeller::DlDispatcherBase::setColorFilter
void setColorFilter(const flutter::DlColorFilter *filter) override
Definition: dl_dispatcher.cc:236
impeller::DlDispatcherBase::scale
void scale(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:348
impeller::DlDispatcherBase::setDrawStyle
void setDrawStyle(flutter::DlDrawStyle style) override
Definition: dl_dispatcher.cc:167
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:878
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:699
impeller::DlDispatcherBase::clipPath
void clipPath(const DlPath &path, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:498
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:728
impeller::DlDispatcherBase::clipRoundSuperellipse
void clipRoundSuperellipse(const DlRoundSuperellipse &rse, flutter::DlClipOp clip_op, bool is_aa) override
Definition: dl_dispatcher.cc:479
impeller::DlDispatcherBase::drawArc
void drawArc(const DlRect &oval_bounds, DlScalar start_degrees, DlScalar sweep_degrees, bool use_center) override
Definition: dl_dispatcher.cc:643
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:307
impeller::DlDispatcherBase::drawDisplayList
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, DlScalar opacity) override
Definition: dl_dispatcher.cc:791
impeller::DlDispatcherBase::transform2DAffine
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
Definition: dl_dispatcher.cc:369
impeller::DlDispatcherBase::setInvertColors
void setInvertColors(bool invert) override
Definition: dl_dispatcher.cc:243
impeller::DlDispatcherBase::setColor
void setColor(flutter::DlColor color) override
Definition: dl_dispatcher.cc:174
impeller::DlDispatcherBase::save
void save(uint32_t total_content_depth) override
Definition: dl_dispatcher.cc:300
impeller::DlDispatcherBase::setStrokeMiter
void setStrokeMiter(DlScalar limit) override
Definition: dl_dispatcher.cc:188
impeller::DlDispatcherBase::translate
void translate(DlScalar tx, DlScalar ty) override
Definition: dl_dispatcher.cc:341
impeller::DlDispatcherBase::drawVertices
void drawVertices(const std::shared_ptr< flutter::DlVertices > &vertices, flutter::DlBlendMode dl_mode) override
Definition: dl_dispatcher.cc:694
impeller::DlDispatcherBase::drawCircle
void drawCircle(const DlPoint &center, DlScalar radius) override
Definition: dl_dispatcher.cc:574
impeller::DlDispatcherBase::drawTextFrame
void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, DlScalar x, DlScalar y) override
Definition: dl_dispatcher.cc:865
impeller::DlDispatcherBase::setMaskFilter
void setMaskFilter(const flutter::DlMaskFilter *filter) override
Definition: dl_dispatcher.cc:270
impeller::DlDispatcherBase::restore
void restore() override
Definition: dl_dispatcher.cc:336
impeller::DlDispatcherBase::setColorSource
void setColorSource(const flutter::DlColorSource *source) override
Definition: dl_dispatcher.cc:229
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:747
impeller::DlDispatcherBase::transformReset
void transformReset() override
Definition: dl_dispatcher.cc:420
impeller::DlDispatcherBase::setBlendMode
void setBlendMode(flutter::DlBlendMode mode) override
Definition: dl_dispatcher.cc:250
impeller::DlDispatcherBase::drawColor
void drawColor(flutter::DlColor color, flutter::DlBlendMode mode) override
Definition: dl_dispatcher.cc:525
impeller::DlDispatcherBase::drawRect
void drawRect(const DlRect &rect) override
Definition: dl_dispatcher.cc:560
impeller::DlDispatcherBase::SimplifyOrDrawPath
static void SimplifyOrDrawPath(Canvas &canvas, const DlPath &cache, const Paint &paint)
Definition: dl_dispatcher.cc:609
impeller::FirstPassDispatcher
Definition: dl_dispatcher.h:318
impeller::FirstPassDispatcher::setColor
void setColor(flutter::DlColor color) override
Definition: dl_dispatcher.cc:1164
impeller::FirstPassDispatcher::setStrokeCap
void setStrokeCap(flutter::DlStrokeCap cap) override
Definition: dl_dispatcher.cc:1179
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:1000
impeller::FirstPassDispatcher::setDrawStyle
void setDrawStyle(flutter::DlDrawStyle style) override
Definition: dl_dispatcher.cc:1159
impeller::FirstPassDispatcher::save
void save() override
Definition: dl_dispatcher.cc:995
impeller::FirstPassDispatcher::restore
void restore() override
Definition: dl_dispatcher.cc:1041
impeller::FirstPassDispatcher::TakeBackdropData
std::pair< std::unordered_map< int64_t, BackdropData >, size_t > TakeBackdropData()
Definition: dl_dispatcher.cc:1218
impeller::FirstPassDispatcher::rotate
void rotate(DlScalar degrees) override
Definition: dl_dispatcher.cc:1055
impeller::FirstPassDispatcher::drawTextFrame
void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, DlScalar x, DlScalar y) override
Definition: dl_dispatcher.cc:1094
impeller::FirstPassDispatcher::setImageFilter
void setImageFilter(const flutter::DlImageFilter *filter) override
Definition: dl_dispatcher.cc:1209
impeller::FirstPassDispatcher::setStrokeMiter
void setStrokeMiter(DlScalar limit) override
Definition: dl_dispatcher.cc:1174
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:1076
impeller::FirstPassDispatcher::scale
void scale(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:1051
impeller::FirstPassDispatcher::translate
void translate(DlScalar tx, DlScalar ty) override
Definition: dl_dispatcher.cc:1047
impeller::FirstPassDispatcher::skew
void skew(DlScalar sx, DlScalar sy) override
Definition: dl_dispatcher.cc:1059
impeller::FirstPassDispatcher::FirstPassDispatcher
FirstPassDispatcher(const ContentContext &renderer, const Matrix &initial_matrix, const Rect cull_rect)
Definition: dl_dispatcher.cc:984
impeller::FirstPassDispatcher::drawDisplayList
void drawDisplayList(const sk_sp< flutter::DisplayList > display_list, DlScalar opacity) override
Definition: dl_dispatcher.cc:1130
impeller::FirstPassDispatcher::setStrokeWidth
void setStrokeWidth(DlScalar width) override
Definition: dl_dispatcher.cc:1169
impeller::FirstPassDispatcher::setStrokeJoin
void setStrokeJoin(flutter::DlStrokeJoin join) override
Definition: dl_dispatcher.cc:1194
impeller::FirstPassDispatcher::~FirstPassDispatcher
~FirstPassDispatcher()
Definition: dl_dispatcher.cc:991
impeller::FirstPassDispatcher::transformReset
void transformReset() override
Definition: dl_dispatcher.cc:1090
impeller::FirstPassDispatcher::transform2DAffine
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
Definition: dl_dispatcher.cc:1065
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::DisplayListToTexture
std::shared_ptr< Texture > DisplayListToTexture(const sk_sp< flutter::DisplayList > &display_list, ISize size, AiksContext &context, bool reset_host_buffer, bool generate_mips)
Render the provided display list to a texture with the given size.
Definition: dl_dispatcher.cc:1224
impeller::DlRect
flutter::DlRect DlRect
Definition: dl_dispatcher.h:25
impeller::DlIRect
flutter::DlIRect DlIRect
Definition: dl_dispatcher.h:26
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:1293
impeller::DlScalar
flutter::DlScalar DlScalar
Definition: dl_dispatcher.h:23
rect.h
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