Flutter Engine
 
Loading...
Searching...
No Matches
display_list_testing.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_TESTING_DISPLAY_LIST_TESTING_H_
6#define FLUTTER_TESTING_DISPLAY_LIST_TESTING_H_
7
8#include <ostream>
9
13
14namespace flutter::testing {
15
16[[nodiscard]] bool DisplayListsEQ_Verbose(const DisplayList* a,
17 const DisplayList* b);
18[[nodiscard]] bool inline DisplayListsEQ_Verbose(const DisplayList& a,
19 const DisplayList& b) {
20 return DisplayListsEQ_Verbose(&a, &b);
21}
22[[nodiscard]] bool inline DisplayListsEQ_Verbose(
23 const sk_sp<const DisplayList>& a,
24 const sk_sp<const DisplayList>& b) {
25 return DisplayListsEQ_Verbose(a.get(), b.get());
26}
27[[nodiscard]] bool DisplayListsNE_Verbose(const DisplayList* a,
28 const DisplayList* b);
29[[nodiscard]] bool inline DisplayListsNE_Verbose(const DisplayList& a,
30 const DisplayList& b) {
31 return DisplayListsNE_Verbose(&a, &b);
32}
33[[nodiscard]] bool inline DisplayListsNE_Verbose(
34 const sk_sp<const DisplayList>& a,
35 const sk_sp<const DisplayList>& b) {
36 return DisplayListsNE_Verbose(a.get(), b.get());
37}
39 public:
40 explicit DlVerbosePath(const DlPath& path) : path(path) {}
41
42 const DlPath& path;
43};
44
45} // namespace flutter::testing
46
47namespace std {
48
49extern std::ostream& operator<<(std::ostream& os,
50 const flutter::DisplayList& display_list);
51extern std::ostream& operator<<(std::ostream& os,
52 const flutter::DlPaint& paint);
53extern std::ostream& operator<<(std::ostream& os, const flutter::DlClipOp& op);
54extern std::ostream& operator<<(std::ostream& os,
55 const flutter::DlPointMode& op);
56extern std::ostream& operator<<(std::ostream& os,
58extern std::ostream& operator<<(std::ostream& os,
59 const flutter::DlStrokeCap& cap);
60extern std::ostream& operator<<(std::ostream& os,
61 const flutter::DlStrokeJoin& join);
62extern std::ostream& operator<<(std::ostream& os,
63 const flutter::DlDrawStyle& style);
64extern std::ostream& operator<<(std::ostream& os,
65 const flutter::DlBlurStyle& style);
66extern std::ostream& operator<<(std::ostream& os,
68extern std::ostream& operator<<(std::ostream& os,
69 const flutter::DlColor& color);
70extern std::ostream& operator<<(std::ostream& os,
72extern std::ostream& operator<<(std::ostream& os,
74extern std::ostream& operator<<(std::ostream& os,
76extern std::ostream& operator<<(std::ostream& os,
77 const flutter::DlImage* image);
78extern std::ostream& operator<<(std::ostream& os,
80extern std::ostream& operator<<(std::ostream& os,
82extern std::ostream& operator<<(std::ostream& os,
83 const flutter::DisplayListOpCategory& category);
84extern std::ostream& operator<<(std::ostream& os, const flutter::DlPath& path);
85extern std::ostream& operator<<(std::ostream& os,
87extern std::ostream& operator<<(std::ostream& os,
89extern std::ostream& operator<<(std::ostream& os,
91extern std::ostream& operator<<(std::ostream& os,
93
94} // namespace std
95
96namespace flutter::testing {
97
99 public:
100 explicit DisplayListStreamDispatcher(std::ostream& os,
101 int cur_indent = 2,
102 int indent = 2)
103 : os_(os), cur_indent_(cur_indent), indent_(indent) {}
104
105 void setAntiAlias(bool aa) override;
106 void setDrawStyle(DlDrawStyle style) override;
107 void setColor(DlColor color) override;
108 void setStrokeWidth(DlScalar width) override;
109 void setStrokeMiter(DlScalar limit) override;
110 void setStrokeCap(DlStrokeCap cap) override;
111 void setStrokeJoin(DlStrokeJoin join) override;
112 void setColorSource(const DlColorSource* source) override;
113 void setColorFilter(const DlColorFilter* filter) override;
114 void setInvertColors(bool invert) override;
115 void setBlendMode(DlBlendMode mode) override;
116 void setMaskFilter(const DlMaskFilter* filter) override;
117 void setImageFilter(const DlImageFilter* filter) override;
118
119 void save() override;
120 void saveLayer(const DlRect& bounds,
121 const SaveLayerOptions options,
122 const DlImageFilter* backdrop,
123 std::optional<int64_t> backdrop_id) override;
124 void restore() override;
125
126 void translate(DlScalar tx, DlScalar ty) override;
127 void scale(DlScalar sx, DlScalar sy) override;
128 void rotate(DlScalar degrees) override;
129 void skew(DlScalar sx, DlScalar sy) override;
130 // clang-format off
131 void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt,
132 DlScalar myx, DlScalar myy, DlScalar myt) override;
134 DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt,
135 DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt,
136 DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt,
137 DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override;
138 // clang-format on
139 void transformReset() override;
140
141 void clipRect(const DlRect& rect, DlClipOp clip_op, bool is_aa) override;
142 void clipOval(const DlRect& bounds, DlClipOp clip_op, bool is_aa) override;
143 void clipRoundRect(const DlRoundRect& rrect,
144 DlClipOp clip_op,
145 bool is_aa) override;
147 DlClipOp clip_op,
148 bool is_aa) override;
149 void clipPath(const DlPath& path, DlClipOp clip_op, bool is_aa) override;
150
151 void drawColor(DlColor color, DlBlendMode mode) override;
152 void drawPaint() override;
153 void drawLine(const DlPoint& p0, const DlPoint& p1) override;
154 void drawDashedLine(const DlPoint& p0,
155 const DlPoint& p1,
156 DlScalar on_length,
157 DlScalar off_length) override;
158 void drawRect(const DlRect& rect) override;
159 void drawOval(const DlRect& bounds) override;
160 void drawCircle(const DlPoint& center, DlScalar radius) override;
161 void drawRoundRect(const DlRoundRect& rrect) override;
162 void drawDiffRoundRect(const DlRoundRect& outer,
163 const DlRoundRect& inner) override;
164 void drawRoundSuperellipse(const DlRoundSuperellipse& rse) override;
165 void drawPath(const DlPath& path) override;
166 void drawArc(const DlRect& oval_bounds,
167 DlScalar start_degrees,
168 DlScalar sweep_degrees,
169 bool use_center) override;
170 void drawPoints(DlPointMode mode,
171 uint32_t count,
172 const DlPoint points[]) override;
173 void drawVertices(const std::shared_ptr<DlVertices>& vertices,
174 DlBlendMode mode) override;
175 void drawImage(const sk_sp<DlImage> image,
176 const DlPoint& point,
177 DlImageSampling sampling,
178 bool render_with_attributes) override;
179 void drawImageRect(const sk_sp<DlImage> image,
180 const DlRect& src,
181 const DlRect& dst,
182 DlImageSampling sampling,
183 bool render_with_attributes,
184 DlSrcRectConstraint constraint) override;
185 void drawImageNine(const sk_sp<DlImage> image,
186 const DlIRect& center,
187 const DlRect& dst,
188 DlFilterMode filter,
189 bool render_with_attributes) override;
190 void drawAtlas(const sk_sp<DlImage> atlas,
191 const DlRSTransform xform[],
192 const DlRect tex[],
193 const DlColor colors[],
194 int count,
195 DlBlendMode mode,
196 DlImageSampling sampling,
197 const DlRect* cull_rect,
198 bool render_with_attributes) override;
199 void drawDisplayList(const sk_sp<DisplayList> display_list,
200 DlScalar opacity) override;
201 void drawText(const std::shared_ptr<DlText>& text,
202 DlScalar x,
203 DlScalar y) override;
204 void drawShadow(const DlPath& path,
205 const DlColor color,
206 const DlScalar elevation,
207 bool transparent_occluder,
208 DlScalar dpr) override;
209
210 void out(const DlColorFilter& filter);
211 void out(const DlColorFilter* filter);
212 void out(const DlImageFilter& filter);
213 void out(const DlImageFilter* filter);
214 void out(const DlVerbosePath& path);
215
216 private:
217 std::ostream& os_;
218 int cur_indent_;
219 int indent_;
220
221 void indent() { indent(indent_); }
222 void outdent() { outdent(indent_); }
223 void indent(int spaces) { cur_indent_ += spaces; }
224 void outdent(int spaces) { cur_indent_ -= spaces; }
225
226 template <class T>
227 std::ostream& out_array(std::string name, int count, const T array[]);
228
229 std::ostream& startl();
230
231 class DlPathStreamer : public DlPathReceiver {
232 public:
233 ~DlPathStreamer();
234
235 explicit DlPathStreamer(DisplayListStreamDispatcher& dispatcher)
236 : dispatcher_(dispatcher) {}
237
238 void MoveTo(const DlPoint& p2, bool will_be_closed) override;
239 void LineTo(const DlPoint& p2) override;
240 void QuadTo(const DlPoint& cp, const DlPoint& p2) override;
241 bool ConicTo(const DlPoint& cp,
242 const DlPoint& p2,
243 DlScalar weight) override;
244 void CubicTo(const DlPoint& cp1,
245 const DlPoint& cp2,
246 const DlPoint& p2) override;
247 void Close() override;
248
249 private:
250 DisplayListStreamDispatcher& dispatcher_;
251 bool done_with_info_ = false;
252 };
253 friend class DlPathStreamer;
254};
255
257 public:
259 type_counts_.fill(0u);
260 category_counts_.fill(0u);
261 }
262
263 void setAntiAlias(bool aa) override {
264 RecordByType(DisplayListOpType::kSetAntiAlias);
265 }
266 void setInvertColors(bool invert) override {
267 RecordByType(DisplayListOpType::kSetInvertColors);
268 }
269 void setStrokeCap(DlStrokeCap cap) override {
270 RecordByType(DisplayListOpType::kSetStrokeCap);
271 }
272 void setStrokeJoin(DlStrokeJoin join) override {
273 RecordByType(DisplayListOpType::kSetStrokeJoin);
274 }
275 void setDrawStyle(DlDrawStyle style) override {
276 RecordByType(DisplayListOpType::kSetStyle);
277 }
278 void setStrokeWidth(float width) override {
279 RecordByType(DisplayListOpType::kSetStrokeWidth);
280 }
281 void setStrokeMiter(float limit) override {
282 RecordByType(DisplayListOpType::kSetStrokeMiter);
283 }
284 void setColor(DlColor color) override {
285 RecordByType(DisplayListOpType::kSetColor);
286 }
287 void setBlendMode(DlBlendMode mode) override {
288 RecordByType(DisplayListOpType::kSetBlendMode);
289 }
290 void setColorSource(const DlColorSource* source) override {
291 if (source) {
292 switch (source->type()) {
294 RecordByType(DisplayListOpType::kSetImageColorSource);
295 break;
297 RecordByType(DisplayListOpType::kSetRuntimeEffectColorSource);
298 break;
303 RecordByType(DisplayListOpType::kSetPodColorSource);
304 break;
305 }
306 } else {
307 RecordByType(DisplayListOpType::kClearColorSource);
308 }
309 }
310 void setImageFilter(const DlImageFilter* filter) override {
311 if (filter) {
312 switch (filter->type()) {
317 RecordByType(DisplayListOpType::kSetPodImageFilter);
318 break;
323 RecordByType(DisplayListOpType::kSetSharedImageFilter);
324 break;
325 }
326 } else {
327 RecordByType(DisplayListOpType::kClearImageFilter);
328 }
329 }
330 void setColorFilter(const DlColorFilter* filter) override {
331 if (filter) {
332 switch (filter->type()) {
337 RecordByType(DisplayListOpType::kSetPodColorFilter);
338 break;
339 }
340 } else {
341 RecordByType(DisplayListOpType::kClearColorFilter);
342 }
343 }
344 void setMaskFilter(const DlMaskFilter* filter) override {
345 if (filter) {
346 switch (filter->type()) {
348 RecordByType(DisplayListOpType::kSetPodMaskFilter);
349 break;
350 }
351 } else {
352 RecordByType(DisplayListOpType::kClearMaskFilter);
353 }
354 }
355
356 void translate(DlScalar tx, DlScalar ty) override {
357 RecordByType(DisplayListOpType::kTranslate);
358 }
359 void scale(DlScalar sx, DlScalar sy) override {
360 RecordByType(DisplayListOpType::kScale);
361 }
362 void rotate(DlScalar degrees) override {
363 RecordByType(DisplayListOpType::kRotate);
364 }
365 void skew(DlScalar sx, DlScalar sy) override {
366 RecordByType(DisplayListOpType::kSkew);
367 }
368 // clang-format off
369 // 2x3 2D affine subset of a 4x4 transform in row major order
371 DlScalar myx, DlScalar myy, DlScalar myt) override {
372 RecordByType(DisplayListOpType::kTransform2DAffine);
373 }
374 // full 4x4 transform in row major order
376 DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt,
377 DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt,
378 DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt,
379 DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) override {
380 RecordByType(DisplayListOpType::kTransformFullPerspective);
381 }
382 // clang-format on
383 void transformReset() override {
384 RecordByType(DisplayListOpType::kTransformReset);
385 }
386
387 void clipRect(const DlRect& rect, DlClipOp clip_op, bool is_aa) override {
388 switch (clip_op) {
390 RecordByType(DisplayListOpType::kClipIntersectRect);
391 break;
393 RecordByType(DisplayListOpType::kClipDifferenceRect);
394 break;
395 }
396 }
397 void clipOval(const DlRect& bounds, DlClipOp clip_op, bool is_aa) override {
398 switch (clip_op) {
400 RecordByType(DisplayListOpType::kClipIntersectOval);
401 break;
403 RecordByType(DisplayListOpType::kClipDifferenceOval);
404 break;
405 }
406 }
407 void clipRoundRect(const DlRoundRect& rrect,
408 DlClipOp clip_op,
409 bool is_aa) override {
410 switch (clip_op) {
412 RecordByType(DisplayListOpType::kClipIntersectRoundRect);
413 break;
415 RecordByType(DisplayListOpType::kClipDifferenceRoundRect);
416 break;
417 }
418 }
420 DlClipOp clip_op,
421 bool is_aa) override {
422 switch (clip_op) {
424 RecordByType(DisplayListOpType::kClipIntersectRoundSuperellipse);
425 break;
427 RecordByType(DisplayListOpType::kClipDifferenceRoundSuperellipse);
428 break;
429 }
430 }
431 void clipPath(const DlPath& path, DlClipOp clip_op, bool is_aa) override {
432 switch (clip_op) {
434 RecordByType(DisplayListOpType::kClipIntersectPath);
435 break;
437 RecordByType(DisplayListOpType::kClipDifferencePath);
438 break;
439 }
440 }
441
442 void save() override { RecordByType(DisplayListOpType::kSave); }
443 void saveLayer(const DlRect& bounds,
444 const SaveLayerOptions options,
445 const DlImageFilter* backdrop,
446 std::optional<int64_t> backdrop_id) override {
447 if (backdrop) {
448 RecordByType(DisplayListOpType::kSaveLayerBackdrop);
449 } else {
450 RecordByType(DisplayListOpType::kSaveLayer);
451 }
452 }
453 void restore() override { RecordByType(DisplayListOpType::kRestore); }
454
455 void drawColor(DlColor color, DlBlendMode mode) override {
456 RecordByType(DisplayListOpType::kDrawColor);
457 }
458 void drawPaint() override { RecordByType(DisplayListOpType::kDrawPaint); }
459 void drawLine(const DlPoint& p0, const DlPoint& p1) override {
460 RecordByType(DisplayListOpType::kDrawLine);
461 }
462 void drawDashedLine(const DlPoint& p0,
463 const DlPoint& p1,
464 DlScalar on_length,
465 DlScalar off_length) override {
466 RecordByType(DisplayListOpType::kDrawDashedLine);
467 }
468 void drawRect(const DlRect& rect) override {
469 RecordByType(DisplayListOpType::kDrawRect);
470 }
471 void drawOval(const DlRect& bounds) override {
472 RecordByType(DisplayListOpType::kDrawOval);
473 }
474 void drawCircle(const DlPoint& center, DlScalar radius) override {
475 RecordByType(DisplayListOpType::kDrawCircle);
476 }
477 void drawRoundRect(const DlRoundRect& rrect) override {
478 RecordByType(DisplayListOpType::kDrawRoundRect);
479 }
481 const DlRoundRect& inner) override {
482 RecordByType(DisplayListOpType::kDrawDiffRoundRect);
483 }
484 void drawRoundSuperellipse(const DlRoundSuperellipse& rse) override {
485 RecordByType(DisplayListOpType::kDrawRoundSuperellipse);
486 }
487 void drawPath(const DlPath& path) override {
488 RecordByType(DisplayListOpType::kDrawPath);
489 }
490 void drawArc(const DlRect& oval_bounds,
491 DlScalar start_degrees,
492 DlScalar sweep_degrees,
493 bool use_center) override {
494 RecordByType(DisplayListOpType::kDrawArc);
495 }
497 uint32_t count,
498 const DlPoint points[]) override {
499 switch (mode) {
501 RecordByType(DisplayListOpType::kDrawPoints);
502 break;
504 RecordByType(DisplayListOpType::kDrawLines);
505 break;
507 RecordByType(DisplayListOpType::kDrawPolygon);
508 break;
509 }
510 }
511 void drawVertices(const std::shared_ptr<DlVertices>& vertices,
512 DlBlendMode mode) override {
513 RecordByType(DisplayListOpType::kDrawVertices);
514 }
515 void drawImage(const sk_sp<DlImage> image,
516 const DlPoint& point,
517 DlImageSampling sampling,
518 bool render_with_attributes) override {
519 if (render_with_attributes) {
520 RecordByType(DisplayListOpType::kDrawImageWithAttr);
521 } else {
522 RecordByType(DisplayListOpType::kDrawImage);
523 }
524 }
525 void drawImageRect(const sk_sp<DlImage> image,
526 const DlRect& src,
527 const DlRect& dst,
528 DlImageSampling sampling,
529 bool render_with_attributes,
530 DlSrcRectConstraint constraint) override {
531 RecordByType(DisplayListOpType::kDrawImageRect);
532 }
533 void drawImageNine(const sk_sp<DlImage> image,
534 const DlIRect& center,
535 const DlRect& dst,
536 DlFilterMode filter,
537 bool render_with_attributes) override {
538 if (render_with_attributes) {
539 RecordByType(DisplayListOpType::kDrawImageNineWithAttr);
540 } else {
541 RecordByType(DisplayListOpType::kDrawImageNine);
542 }
543 }
544 void drawAtlas(const sk_sp<DlImage> atlas,
545 const DlRSTransform xform[],
546 const DlRect tex[],
547 const DlColor colors[],
548 int count,
549 DlBlendMode mode,
550 DlImageSampling sampling,
551 const DlRect* cull_rect,
552 bool render_with_attributes) override {
553 if (cull_rect) {
554 RecordByType(DisplayListOpType::kDrawAtlasCulled);
555 } else {
556 RecordByType(DisplayListOpType::kDrawAtlas);
557 }
558 }
559 void drawDisplayList(const sk_sp<DisplayList> display_list,
560 DlScalar opacity) override {
561 RecordByType(DisplayListOpType::kDrawDisplayList);
562 }
563 void drawText(const std::shared_ptr<DlText>& text,
564 DlScalar x,
565 DlScalar y) override {
566 RecordByType(DisplayListOpType::kDrawText);
567 }
568 void drawShadow(const DlPath& path,
569 const DlColor color,
570 const DlScalar elevation,
571 bool transparent_occluder,
572 DlScalar dpr) override {
573 if (transparent_occluder) {
574 RecordByType(DisplayListOpType::kDrawShadowTransparentOccluder);
575 } else {
576 RecordByType(DisplayListOpType::kDrawShadow);
577 }
578 }
579
580 uint32_t GetOpsReceived() { return op_count_; }
582 return category_counts_[static_cast<int>(category)];
583 }
585 return type_counts_[static_cast<int>(type)];
586 }
587
588 protected:
593
595 category_counts_[static_cast<int>(category)]++;
596 switch (category) {
599 break;
602 break;
604 RecordClip();
605 break;
607 RecordSave();
608 break;
611 break;
614 break;
617 break;
620 break;
623 break;
624 }
625 }
626
627 virtual void RecordAttribute() { RecordOp(); }
628 virtual void RecordTransform() { RecordOp(); }
629 virtual void RecordClip() { RecordOp(); }
630 virtual void RecordSave() { RecordOp(); }
631 virtual void RecordSaveLayer() { RecordOp(); }
632 virtual void RecordRestore() { RecordOp(); }
633 virtual void RecordRendering() { RecordOp(); }
634 virtual void RecordSubDisplayList() { RecordOp(); }
635 virtual void RecordInvalid() { RecordOp(); }
636
637 virtual void RecordOp() { op_count_++; }
638
639 static constexpr size_t kTypeCount =
640 static_cast<size_t>(DisplayListOpType::kMaxOp) + 1;
641 static constexpr size_t kCategoryCount =
642 static_cast<size_t>(DisplayListOpCategory::kMaxCategory) + 1;
643
644 std::array<uint32_t, kTypeCount> type_counts_;
645 std::array<uint32_t, kCategoryCount> category_counts_;
646 uint32_t op_count_ = 0u;
647};
648
649} // namespace flutter::testing
650
651#endif // FLUTTER_TESTING_DISPLAY_LIST_TESTING_H_
GLenum type
DisplayListOpCategory GetOpCategory(DlIndex index) const
Return an enum describing the general category of the operation record stored at the indicated index.
virtual T type() const =0
Represents an image whose allocation is (usually) resident on device memory.
Definition dl_image.h:32
Internal API for rendering recorded display lists to backends.
void drawColor(DlColor color, DlBlendMode mode) override
void clipRoundSuperellipse(const DlRoundSuperellipse &rse, DlClipOp clip_op, bool is_aa) override
void setImageFilter(const DlImageFilter *filter) override
void drawOval(const DlRect &bounds) override
void drawImage(const sk_sp< DlImage > image, const DlPoint &point, DlImageSampling sampling, bool render_with_attributes) override
void setColorSource(const DlColorSource *source) override
void drawImageNine(const sk_sp< DlImage > image, const DlIRect &center, const DlRect &dst, DlFilterMode filter, bool render_with_attributes) override
void setMaskFilter(const DlMaskFilter *filter) override
void saveLayer(const DlRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
void drawRoundRect(const DlRoundRect &rrect) override
void skew(DlScalar sx, DlScalar sy) override
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
std::array< uint32_t, kTypeCount > type_counts_
void drawPoints(DlPointMode mode, uint32_t count, const DlPoint points[]) override
void translate(DlScalar tx, DlScalar ty) override
void scale(DlScalar sx, DlScalar sy) override
virtual void RecordByType(DisplayListOpType type)
void drawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
void drawImageRect(const sk_sp< DlImage > image, const DlRect &src, const DlRect &dst, DlImageSampling sampling, bool render_with_attributes, DlSrcRectConstraint constraint) override
void drawRoundSuperellipse(const DlRoundSuperellipse &rse) override
void setColorFilter(const DlColorFilter *filter) override
void drawCircle(const DlPoint &center, DlScalar radius) override
void drawDisplayList(const sk_sp< DisplayList > display_list, DlScalar opacity) override
void setStrokeJoin(DlStrokeJoin join) override
void drawArc(const DlRect &oval_bounds, DlScalar start_degrees, DlScalar sweep_degrees, bool use_center) override
void clipPath(const DlPath &path, DlClipOp clip_op, bool is_aa) override
std::array< uint32_t, kCategoryCount > category_counts_
uint32_t GetOpsReceived(DisplayListOpType type)
void drawLine(const DlPoint &p0, const DlPoint &p1) override
void clipOval(const DlRect &bounds, DlClipOp clip_op, bool is_aa) override
void clipRect(const DlRect &rect, DlClipOp clip_op, bool is_aa) override
void drawAtlas(const sk_sp< DlImage > atlas, const DlRSTransform xform[], const DlRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const DlRect *cull_rect, bool render_with_attributes) override
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
uint32_t GetOpsReceived(DisplayListOpCategory category)
void drawShadow(const DlPath &path, const DlColor color, const DlScalar elevation, bool transparent_occluder, DlScalar dpr) override
void drawText(const std::shared_ptr< DlText > &text, DlScalar x, DlScalar y) override
void drawDiffRoundRect(const DlRoundRect &outer, const DlRoundRect &inner) override
virtual void RecordByCategory(DisplayListOpCategory category)
void clipRoundRect(const DlRoundRect &rrect, DlClipOp clip_op, bool is_aa) override
void setDrawStyle(DlDrawStyle style) override
void drawVertices(const std::shared_ptr< DlVertices > &vertices, DlBlendMode mode) override
void drawVertices(const std::shared_ptr< DlVertices > &vertices, DlBlendMode mode) override
void drawShadow(const DlPath &path, const DlColor color, const DlScalar elevation, bool transparent_occluder, DlScalar dpr) override
void drawImageNine(const sk_sp< DlImage > image, const DlIRect &center, const DlRect &dst, DlFilterMode filter, bool render_with_attributes) override
void clipRect(const DlRect &rect, DlClipOp clip_op, bool is_aa) override
void drawCircle(const DlPoint &center, DlScalar radius) override
void setImageFilter(const DlImageFilter *filter) override
void drawArc(const DlRect &oval_bounds, DlScalar start_degrees, DlScalar sweep_degrees, bool use_center) override
DisplayListStreamDispatcher(std::ostream &os, int cur_indent=2, int indent=2)
void transform2DAffine(DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) override
void drawText(const std::shared_ptr< DlText > &text, DlScalar x, DlScalar y) override
void drawDisplayList(const sk_sp< DisplayList > display_list, DlScalar opacity) override
void drawPoints(DlPointMode mode, uint32_t count, const DlPoint points[]) override
void drawImageRect(const sk_sp< DlImage > image, const DlRect &src, const DlRect &dst, DlImageSampling sampling, bool render_with_attributes, DlSrcRectConstraint constraint) override
void drawImage(const sk_sp< DlImage > image, const DlPoint &point, DlImageSampling sampling, bool render_with_attributes) override
void setMaskFilter(const DlMaskFilter *filter) override
void clipPath(const DlPath &path, DlClipOp clip_op, bool is_aa) override
void clipRoundSuperellipse(const DlRoundSuperellipse &rse, DlClipOp clip_op, bool is_aa) override
void clipRoundRect(const DlRoundRect &rrect, DlClipOp clip_op, bool is_aa) override
void drawAtlas(const sk_sp< DlImage > atlas, const DlRSTransform xform[], const DlRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const DlRect *cull_rect, bool render_with_attributes) override
void drawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
void drawRoundRect(const DlRoundRect &rrect) override
void clipOval(const DlRect &bounds, DlClipOp clip_op, bool is_aa) override
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
void setColorFilter(const DlColorFilter *filter) override
void drawDiffRoundRect(const DlRoundRect &outer, const DlRoundRect &inner) override
void drawOval(const DlRect &bounds) override
void saveLayer(const DlRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop, std::optional< int64_t > backdrop_id) override
void skew(DlScalar sx, DlScalar sy) override
void drawRoundSuperellipse(const DlRoundSuperellipse &rse) override
void drawLine(const DlPoint &p0, const DlPoint &p1) override
void drawColor(DlColor color, DlBlendMode mode) override
void translate(DlScalar tx, DlScalar ty) override
void scale(DlScalar sx, DlScalar sy) override
void setColorSource(const DlColorSource *source) override
int32_t x
FlutterVulkanImage * image
std::u16string text
double y
bool DisplayListsNE_Verbose(const DisplayList *a, const DisplayList *b)
bool DisplayListsEQ_Verbose(const DisplayList *a, const DisplayList *b)
impeller::Scalar DlScalar
impeller::PathReceiver DlPathReceiver
Definition dl_path.h:17
DlStrokeJoin
Definition dl_paint.h:37
DisplayListOpCategory
DlStrokeCap
Definition dl_paint.h:28
DlPointMode
Definition dl_types.h:15
@ kLines
draw each separate pair of points as a line segment
@ kPolygon
draw each pair of overlapping points as a line segment
@ kPoints
draw each point separately
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
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27
DlVertexMode
Defines the way in which the vertices of a DlVertices object are separated into triangles into which ...
Definition dl_vertices.h:18
DlDrawStyle
Definition dl_paint.h:19
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
impeller::Point DlPoint
DlSrcRectConstraint
Definition dl_types.h:21
BlendMode
Definition color.h:58
void MoveTo(PathBuilder *builder, Scalar x, Scalar y)
void LineTo(PathBuilder *builder, Scalar x, Scalar y)
void CubicTo(PathBuilder *builder, Scalar x1, Scalar y1, Scalar x2, Scalar y2, Scalar x3, Scalar y3)
void Close(PathBuilder *builder)
Definition ref_ptr.h:261
flutter::testing::DisplayListStreamDispatcher DisplayListStreamDispatcher
std::ostream & operator<<(std::ostream &out, const impeller::Arc &a)
Definition arc.h:141
int32_t width
std::vector< Point > points