Flutter Engine
 
Loading...
Searching...
No Matches
dl_op_records.h File Reference

Go to the source code of this file.

Classes

struct  flutter::DLOp
 
struct  flutter::SetStyleOp
 
struct  flutter::SetStrokeWidthOp
 
struct  flutter::SetStrokeMiterOp
 
struct  flutter::SetColorOp
 
struct  flutter::SetBlendModeOp
 
struct  flutter::SetImageColorSourceOp
 
struct  flutter::SetRuntimeEffectColorSourceOp
 
struct  flutter::SetSharedImageFilterOp
 
struct  flutter::SaveOpBase
 
struct  flutter::SaveOp
 
struct  flutter::SaveLayerOpBase
 
struct  flutter::SaveLayerOp
 
struct  flutter::SaveLayerBackdropOp
 
struct  flutter::RestoreOp
 
struct  flutter::TransformClipOpBase
 
struct  flutter::TranslateOp
 
struct  flutter::ScaleOp
 
struct  flutter::RotateOp
 
struct  flutter::SkewOp
 
struct  flutter::Transform2DAffineOp
 
struct  flutter::TransformFullPerspectiveOp
 
struct  flutter::TransformResetOp
 
struct  flutter::DrawOpBase
 
struct  flutter::DrawPaintOp
 
struct  flutter::DrawColorOp
 
struct  flutter::DrawPathOp
 
struct  flutter::DrawDashedLineOp
 
struct  flutter::DrawArcOp
 
struct  flutter::DrawVerticesOp
 
struct  flutter::DrawImageRectOp
 
struct  flutter::DrawAtlasBaseOp
 
struct  flutter::DrawAtlasOp
 
struct  flutter::DrawAtlasCulledOp
 
struct  flutter::DrawDisplayListOp
 
struct  flutter::DrawTextOp
 

Namespaces

namespace  flutter
 

Macros

#define DEFINE_SET_BOOL_OP(name)
 
#define DEFINE_SET_ENUM_OP(name)
 
#define DEFINE_SET_CLEAR_DLATTR_OP(name, field)
 
#define DEFINE_CLIP_SHAPE_OP(shapename, shapetype, clipop)
 
#define DEFINE_CLIP_PATH_OP(clipop)
 
#define DEFINE_DRAW_1ARG_OP(op_name, arg_type, arg_name)
 
#define DEFINE_DRAW_2ARG_OP(op_name, type1, name1, type2, name2)
 
#define DEFINE_DRAW_POINTS_OP(name, mode)
 
#define DEFINE_DRAW_IMAGE_OP(name, with_attributes)
 
#define DEFINE_DRAW_IMAGE_NINE_OP(name, render_with_attributes)
 
#define DEFINE_DRAW_SHADOW_OP(name, transparent_occluder)
 

Enumerations

enum class  flutter::DisplayListCompare {
  flutter::kUseBulkCompare ,
  flutter::kNotEqual ,
  flutter::kEqual
}
 

Functions

 flutter::DEFINE_DRAW_POINTS_OP (Points, kPoints)
 
 flutter::DEFINE_DRAW_POINTS_OP (Lines, kLines)
 
 flutter::DEFINE_DRAW_POINTS_OP (Polygon, kPolygon)
 

Macro Definition Documentation

◆ DEFINE_CLIP_PATH_OP

#define DEFINE_CLIP_PATH_OP (   clipop)
Value:
struct Clip##clipop##PathOp final : TransformClipOpBase { \
static constexpr auto kType = DisplayListOpType::kClip##clipop##Path; \
\
Clip##clipop##PathOp(const DlPath& path, bool is_aa) \
: TransformClipOpBase(kType), is_aa(is_aa), path(path) {} \
\
const bool is_aa; \
const DlPath path; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.clipPath(path, DlClipOp::k##clipop, is_aa); \
} \
\
DisplayListCompare equals(const Clip##clipop##PathOp* other) const { \
return is_aa == other->is_aa && path == other->path \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};
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

Definition at line 520 of file dl_op_records.h.

521 : TransformClipOpBase { \
522 static constexpr auto kType = DisplayListOpType::kClip##clipop##Path; \
523 \
524 Clip##clipop##PathOp(const DlPath& path, bool is_aa) \
525 : TransformClipOpBase(kType), is_aa(is_aa), path(path) {} \
526 \
527 const bool is_aa; \
528 const DlPath path; \
529 \
530 void dispatch(DlOpReceiver& receiver) const { \
531 receiver.clipPath(path, DlClipOp::k##clipop, is_aa); \
532 } \
533 \
534 DisplayListCompare equals(const Clip##clipop##PathOp* other) const { \
535 return is_aa == other->is_aa && path == other->path \
536 ? DisplayListCompare::kEqual \
537 : DisplayListCompare::kNotEqual; \
538 } \
539 };
CanvasPath Path
Definition dart_ui.cc:54
flutter::DlPath DlPath

◆ DEFINE_CLIP_SHAPE_OP

#define DEFINE_CLIP_SHAPE_OP (   shapename,
  shapetype,
  clipop 
)
Value:
struct Clip##clipop##shapename##Op final : TransformClipOpBase { \
static constexpr auto kType = DisplayListOpType::kClip##clipop##shapename; \
\
Clip##clipop##shapename##Op(shapetype shape, bool is_aa) \
: TransformClipOpBase(kType), is_aa(is_aa), shape(shape) {} \
\
const bool is_aa; \
const shapetype shape; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.clip##shapename(shape, DlClipOp::k##clipop, is_aa); \
} \
};

Definition at line 495 of file dl_op_records.h.

496 : TransformClipOpBase { \
497 static constexpr auto kType = DisplayListOpType::kClip##clipop##shapename; \
498 \
499 Clip##clipop##shapename##Op(shapetype shape, bool is_aa) \
500 : TransformClipOpBase(kType), is_aa(is_aa), shape(shape) {} \
501 \
502 const bool is_aa; \
503 const shapetype shape; \
504 \
505 void dispatch(DlOpReceiver& receiver) const { \
506 receiver.clip##shapename(shape, DlClipOp::k##clipop, is_aa); \
507 } \
508 };
void Op(SkPathBuilder *one, SkPathBuilder *two, SkPathOp op)
Definition path_ops.cc:44

◆ DEFINE_DRAW_1ARG_OP

#define DEFINE_DRAW_1ARG_OP (   op_name,
  arg_type,
  arg_name 
)
Value:
struct Draw##op_name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
\
explicit Draw##op_name##Op(arg_type arg_name) \
: DrawOpBase(kType), arg_name(arg_name) {} \
\
const arg_type arg_name; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.draw##op_name(arg_name); \
} \
};

Definition at line 584 of file dl_op_records.h.

585 : DrawOpBase { \
586 static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
587 \
588 explicit Draw##op_name##Op(arg_type arg_name) \
589 : DrawOpBase(kType), arg_name(arg_name) {} \
590 \
591 const arg_type arg_name; \
592 \
593 void dispatch(DlOpReceiver& receiver) const { \
594 receiver.draw##op_name(arg_name); \
595 } \
596 };

◆ DEFINE_DRAW_2ARG_OP

#define DEFINE_DRAW_2ARG_OP (   op_name,
  type1,
  name1,
  type2,
  name2 
)
Value:
struct Draw##op_name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
\
Draw##op_name##Op(type1 name1, type2 name2) \
: DrawOpBase(kType), name1(name1), name2(name2) {} \
\
const type1 name1; \
const type2 name2; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.draw##op_name(name1, name2); \
} \
};

Definition at line 628 of file dl_op_records.h.

629 : DrawOpBase { \
630 static constexpr auto kType = DisplayListOpType::kDraw##op_name; \
631 \
632 Draw##op_name##Op(type1 name1, type2 name2) \
633 : DrawOpBase(kType), name1(name1), name2(name2) {} \
634 \
635 const type1 name1; \
636 const type2 name2; \
637 \
638 void dispatch(DlOpReceiver& receiver) const { \
639 receiver.draw##op_name(name1, name2); \
640 } \
641 };

◆ DEFINE_DRAW_IMAGE_NINE_OP

#define DEFINE_DRAW_IMAGE_NINE_OP (   name,
  render_with_attributes 
)

Definition at line 808 of file dl_op_records.h.

809 : DrawOpBase { \
810 static constexpr auto kType = DisplayListOpType::k##name; \
811 static constexpr uint32_t kDepthInc = 9; \
812 \
813 name##Op(const sk_sp<DlImage>& image, \
814 const DlIRect& center, \
815 const DlRect& dst, \
816 DlFilterMode mode) \
817 : DrawOpBase(kType), \
818 center(center), \
819 dst(dst), \
820 mode(mode), \
821 image(std::move(image)) {} \
822 \
823 const DlIRect center; \
824 const DlRect dst; \
825 const DlFilterMode mode; \
826 const sk_sp<DlImage> image; \
827 \
828 void dispatch(DlOpReceiver& receiver) const { \
829 receiver.drawImageNine(image, center, dst, mode, \
830 render_with_attributes); \
831 } \
832 \
833 DisplayListCompare equals(const name##Op* other) const { \
834 return (center == other->center && dst == other->dst && \
835 mode == other->mode && image->Equals(other->image)) \
836 ? DisplayListCompare::kEqual \
837 : DisplayListCompare::kNotEqual; \
838 } \
839 };
FlutterVulkanImage * image
const char * name
Definition fuchsia.cc:49
impeller::Rect DlRect
impeller::IRect32 DlIRect
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

◆ DEFINE_DRAW_IMAGE_OP

#define DEFINE_DRAW_IMAGE_OP (   name,
  with_attributes 
)
Value:
struct name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::k##name; \
\
name##Op(const sk_sp<DlImage>& image, \
const DlPoint& point, \
DlImageSampling sampling) \
: DrawOpBase(kType), \
point(point), \
sampling(sampling), \
image(std::move(image)) {} \
\
const DlPoint point; \
const DlImageSampling sampling; \
const sk_sp<DlImage> image; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.drawImage(image, point, sampling, with_attributes); \
} \
\
DisplayListCompare equals(const name##Op* other) const { \
return (point == other->point && sampling == other->sampling && \
image->Equals(other->image)) \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};

Definition at line 735 of file dl_op_records.h.

736 : DrawOpBase { \
737 static constexpr auto kType = DisplayListOpType::k##name; \
738 \
739 name##Op(const sk_sp<DlImage>& image, \
740 const DlPoint& point, \
741 DlImageSampling sampling) \
742 : DrawOpBase(kType), \
743 point(point), \
744 sampling(sampling), \
745 image(std::move(image)) {} \
746 \
747 const DlPoint point; \
748 const DlImageSampling sampling; \
749 const sk_sp<DlImage> image; \
750 \
751 void dispatch(DlOpReceiver& receiver) const { \
752 receiver.drawImage(image, point, sampling, with_attributes); \
753 } \
754 \
755 DisplayListCompare equals(const name##Op* other) const { \
756 return (point == other->point && sampling == other->sampling && \
757 image->Equals(other->image)) \
758 ? DisplayListCompare::kEqual \
759 : DisplayListCompare::kNotEqual; \
760 } \
761 };
impeller::Point DlPoint

◆ DEFINE_DRAW_POINTS_OP

#define DEFINE_DRAW_POINTS_OP (   name,
  mode 
)
Value:
struct Draw##name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##name; \
\
explicit Draw##name##Op(uint32_t count) \
: DrawOpBase(kType), count(count) {} \
\
const uint32_t count; \
\
void dispatch(DlOpReceiver& receiver) const { \
const DlPoint* pts = reinterpret_cast<const DlPoint*>(this + 1); \
receiver.drawPoints(DlPointMode::mode, count, pts); \
} \
};

Definition at line 698 of file dl_op_records.h.

699 : DrawOpBase { \
700 static constexpr auto kType = DisplayListOpType::kDraw##name; \
701 \
702 explicit Draw##name##Op(uint32_t count) \
703 : DrawOpBase(kType), count(count) {} \
704 \
705 const uint32_t count; \
706 \
707 void dispatch(DlOpReceiver& receiver) const { \
708 const DlPoint* pts = reinterpret_cast<const DlPoint*>(this + 1); \
709 receiver.drawPoints(DlPointMode::mode, count, pts); \
710 } \
711 };

◆ DEFINE_DRAW_SHADOW_OP

#define DEFINE_DRAW_SHADOW_OP (   name,
  transparent_occluder 
)
Value:
struct Draw##name##Op final : DrawOpBase { \
static constexpr auto kType = DisplayListOpType::kDraw##name; \
\
Draw##name##Op(const DlPath& path, \
DlColor color, \
DlScalar elevation, \
DlScalar dpr) \
: DrawOpBase(kType), \
color(color), \
elevation(elevation), \
dpr(dpr), \
path(path) {} \
\
const DlColor color; \
const DlScalar elevation; \
const DlScalar dpr; \
const DlPath path; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.drawShadow(path, color, elevation, transparent_occluder, dpr); \
} \
\
DisplayListCompare equals(const Draw##name##Op* other) const { \
return color == other->color && elevation == other->elevation && \
dpr == other->dpr && path == other->path \
? DisplayListCompare::kEqual \
: DisplayListCompare::kNotEqual; \
} \
};

Definition at line 1023 of file dl_op_records.h.

1024 : DrawOpBase { \
1025 static constexpr auto kType = DisplayListOpType::kDraw##name; \
1026 \
1027 Draw##name##Op(const DlPath& path, \
1028 DlColor color, \
1029 DlScalar elevation, \
1030 DlScalar dpr) \
1031 : DrawOpBase(kType), \
1032 color(color), \
1033 elevation(elevation), \
1034 dpr(dpr), \
1035 path(path) {} \
1036 \
1037 const DlColor color; \
1038 const DlScalar elevation; \
1039 const DlScalar dpr; \
1040 const DlPath path; \
1041 \
1042 void dispatch(DlOpReceiver& receiver) const { \
1043 receiver.drawShadow(path, color, elevation, transparent_occluder, dpr); \
1044 } \
1045 \
1046 DisplayListCompare equals(const Draw##name##Op* other) const { \
1047 return color == other->color && elevation == other->elevation && \
1048 dpr == other->dpr && path == other->path \
1049 ? DisplayListCompare::kEqual \
1050 : DisplayListCompare::kNotEqual; \
1051 } \
1052 };
impeller::Scalar DlScalar
flutter::DlColor DlColor

◆ DEFINE_SET_BOOL_OP

#define DEFINE_SET_BOOL_OP (   name)
Value:
struct Set##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSet##name; \
\
explicit Set##name##Op(bool value) : DLOp(kType), value(value) {} \
\
const bool value; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.set##name(value); \
} \
};
int32_t value

Definition at line 71 of file dl_op_records.h.

72 : DLOp { \
73 static constexpr auto kType = DisplayListOpType::kSet##name; \
74 \
75 explicit Set##name##Op(bool value) : DLOp(kType), value(value) {} \
76 \
77 const bool value; \
78 \
79 void dispatch(DlOpReceiver& receiver) const { \
80 receiver.set##name(value); \
81 } \
82 };

◆ DEFINE_SET_CLEAR_DLATTR_OP

#define DEFINE_SET_CLEAR_DLATTR_OP (   name,
  field 
)
Value:
struct Clear##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kClear##name; \
\
Clear##name##Op() : DLOp(kType) {} \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.set##name(nullptr); \
} \
}; \
struct SetPod##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSetPod##name; \
\
SetPod##name##Op() : DLOp(kType) {} \
\
void dispatch(DlOpReceiver& receiver) const { \
const Dl##name* filter = reinterpret_cast<const Dl##name*>(this + 1); \
receiver.set##name(filter); \
} \
};

Definition at line 171 of file dl_op_records.h.

172 : DLOp { \
173 static constexpr auto kType = DisplayListOpType::kClear##name; \
174 \
175 Clear##name##Op() : DLOp(kType) {} \
176 \
177 void dispatch(DlOpReceiver& receiver) const { \
178 receiver.set##name(nullptr); \
179 } \
180 }; \
181 struct SetPod##name##Op final : DLOp { \
182 static constexpr auto kType = DisplayListOpType::kSetPod##name; \
183 \
184 SetPod##name##Op() : DLOp(kType) {} \
185 \
186 void dispatch(DlOpReceiver& receiver) const { \
187 const Dl##name* filter = reinterpret_cast<const Dl##name*>(this + 1); \
188 receiver.set##name(filter); \
189 } \
190 };

◆ DEFINE_SET_ENUM_OP

#define DEFINE_SET_ENUM_OP (   name)
Value:
struct SetStroke##name##Op final : DLOp { \
static constexpr auto kType = DisplayListOpType::kSetStroke##name; \
\
explicit SetStroke##name##Op(DlStroke##name value) \
: DLOp(kType), value(value) {} \
\
const DlStroke##name value; \
\
void dispatch(DlOpReceiver& receiver) const { \
receiver.setStroke##name(value); \
} \
};

Definition at line 88 of file dl_op_records.h.

89 : DLOp { \
90 static constexpr auto kType = DisplayListOpType::kSetStroke##name; \
91 \
92 explicit SetStroke##name##Op(DlStroke##name value) \
93 : DLOp(kType), value(value) {} \
94 \
95 const DlStroke##name value; \
96 \
97 void dispatch(DlOpReceiver& receiver) const { \
98 receiver.setStroke##name(value); \
99 } \
100 };