87 {
89 return nullptr;
90 }
92 FML_CHECK(byte_data.length_in_bytes() == kDataByteCount);
93
94 const uint32_t* uint_data = static_cast<const uint32_t*>(byte_data.data());
95 const float* float_data = static_cast<const float*>(byte_data.data());
96
98 if (Dart_IsNull(paint_objects_)) {
99 if (flags.applies_shader()) {
101 }
102 if (flags.applies_color_filter()) {
104 }
105 if (flags.applies_image_filter()) {
107 }
108 } else {
111 Dart_ListLength(paint_objects_, &
length);
112
114 if (Dart_IsError(
115 Dart_ListGetRange(paint_objects_, 0, kObjectCount, values))) {
116 return nullptr;
117 }
118
119 if (flags.applies_shader()) {
121 if (Dart_IsNull(shader)) {
123 } else {
125 auto sampling =
126 ImageFilter::SamplingFromIndex(uint_data[kFilterQualityIndex]);
128 } else {
130 }
131 }
132 }
133
134 if (flags.applies_color_filter()) {
138 } else {
139 ColorFilter* decoded =
142 }
143 }
144
145 if (flags.applies_image_filter()) {
149 } else {
150 ImageFilter* decoded =
153 }
154 }
155 }
156
157 if (flags.applies_anti_alias()) {
159 }
160
161 if (flags.applies_alpha_or_color()) {
163 }
164
165 if (flags.applies_blend()) {
169 }
170
171 if (flags.applies_style()) {
174 }
175
179
182
185
188 }
189
190 if (flags.applies_color_filter()) {
192 }
193
194 if (flags.applies_mask_filter()) {
195 switch (uint_data[kMaskFilterIndex]) {
198 break;
204 DlBlurMaskFilter::Make(blur_style, SafeNarrow(sigma)));
205 break;
206 }
207 }
208
210}
DlPaint & setColor(DlColor color)
DlPaint & setAntiAlias(bool isAntiAlias)
DlPaint & setInvertColors(bool isInvertColors)
DlPaint & setStrokeCap(DlStrokeCap cap)
DlPaint & setStrokeWidth(float width)
DlPaint & setStrokeMiter(float miter)
DlPaint & setBlendMode(DlBlendMode mode)
DlDrawStyle getDrawStyle() const
DlPaint & setImageFilter(std::nullptr_t filter)
DlPaint & setMaskFilter(std::nullptr_t filter)
DlPaint & setDrawStyle(DlDrawStyle style)
DlPaint & setStrokeJoin(DlStrokeJoin join)
DlPaint & setColorFilter(std::nullptr_t filter)
DlPaint & setColorSource(std::nullptr_t source)
const DlPaint * paint(DlPaint &paint, const DisplayListAttributeFlags &flags, DlTileMode tile_mode) const
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
constexpr int kStrokeJoinIndex
constexpr int kShaderIndex
constexpr int kBlendModeIndex
constexpr int kStyleIndex
constexpr int kMaskFilterSigmaIndex
constexpr int kStrokeCapIndex
constexpr int kObjectCount
constexpr uint32_t kBlendModeDefault
constexpr int kColorFilterIndex
constexpr int kStrokeMiterLimitIndex
constexpr int kImageFilterIndex
impeller::BlendMode DlBlendMode
constexpr int kStrokeWidthIndex
constexpr int kMaskFilterBlurStyleIndex
const flutter::DlColorFilter * color_filter
const flutter::DlImageFilter * image_filter