| Flutter Impeller |

Public Member Functions | List of all members
impeller::TraceSerializer Class Reference

`#include <trace_serializer.h>`

## Public Member Functions
| TraceSerializer ()
void | Write (CanvasRecorderOp op)
void | Write (const Paint &paint)
void | Write (const std::optional< Rect > optional_rect)
void | Write (const std::shared_ptr< ImageFilter > &image_filter)
void | Write (size_t size)
void | Write (const Matrix &matrix)
void | Write (const Vector3 &vec3)
void | Write (const Vector2 &vec2)
void | Write (const Radians &vec2)
void | Write (const Path &path)
void | Write (const std::vector< Point > &points)
void | Write (const PointStyle &point_style)
void | Write (const std::shared_ptr< Image > &image)
void | Write (const SamplerDescriptor &sampler)
void | Write (const Entity::ClipOperation &clip_op)
void | Write (const Picture &clip_op)
void | Write (const std::shared_ptr< TextFrame > &text_frame)
void | Write (const std::shared_ptr< VerticesGeometry > &vertices)
void | Write (const BlendMode &blend_mode)
void | Write (const std::vector< Matrix > &matrices)
void | Write (const std::vector< Rect > &matrices)
void | Write (const std::vector< Color > &matrices)

## Detailed Description

Definition at line 13 of file trace_serializer.h.

## Constructor & Destructor Documentation

## ◆ TraceSerializer()

impeller::TraceSerializer::TraceSerializer | ( |  | ) |

Definition at line 152 of file trace_serializer.cc.

152 {}

## Member Function Documentation

## ◆ Write() [1/22]

void impeller::TraceSerializer::Write | ( | CanvasRecorderOp | op | ) |

Definition at line 154 of file trace_serializer.cc.

154 {
155 if (op == CanvasRecorderOp::kNew) {
156 FML_LOG(ERROR) << "######################################################";
157 } else {
158 FML_LOG(ERROR) << CanvasRecorderOpToString(op) << ":" << buffer_.str();
159 buffer_.str("");
160 buffer_.clear();
161 }
162 }

References impeller::kNew.

## ◆ Write() [2/22]

void impeller::TraceSerializer::Write | ( | const BlendMode & | blend_mode | ) |

Definition at line 243 of file trace_serializer.cc.

243 {
244 buffer_ << "[" << BlendModeToString(blend_mode) << "] ";
245 }

References impeller::BlendModeToString().

## ◆ Write() [3/22]

void impeller::TraceSerializer::Write | ( | const Entity::ClipOperation & | clip_op | ) |

Definition at line 220 of file trace_serializer.cc.

220 {
221 switch (clip_op) {
222 case Entity::ClipOperation::kDifference:
223 buffer_ << "[kDifference] ";
224 break;
225 case Entity::ClipOperation::kIntersect:
226 buffer_ << "[kIntersect] ";
227 break;
228 }
229 }

References impeller::Entity::kDifference, and impeller::Entity::kIntersect.

## ◆ Write() [4/22]

void impeller::TraceSerializer::Write | ( | const Matrix & | matrix | ) |

Definition at line 184 of file trace_serializer.cc.

184 {
185 buffer_ << "[" << matrix << "] ";
186 }

## ◆ Write() [5/22]

void impeller::TraceSerializer::Write | ( | const Paint & | paint | ) |

Definition at line 164 of file trace_serializer.cc.

164 {
165 buffer_ << "[" << paint << "] ";
166 }

## ◆ Write() [6/22]

void impeller::TraceSerializer::Write | ( | const Path & | path | ) |

Definition at line 200 of file trace_serializer.cc.

200 {
201 buffer_ << "[Path] ";
202 }

## ◆ Write() [7/22]

void impeller::TraceSerializer::Write | ( | const Picture & | clip_op | ) |

Definition at line 231 of file trace_serializer.cc.

231 {
232 buffer_ << "[Picture] ";
233 }

## ◆ Write() [8/22]

void impeller::TraceSerializer::Write | ( | const PointStyle & | point_style | ) |

Definition at line 208 of file trace_serializer.cc.

208 {
209 buffer_ << "[PointStyle] ";
210 }

## ◆ Write() [9/22]

void impeller::TraceSerializer::Write | ( | const Radians & | vec2 | ) |

Definition at line 196 of file trace_serializer.cc.

196 {
197 buffer_ << "[" << radians.radians << "] ";
198 }

References impeller::Radians::radians.

## ◆ Write() [10/22]

void impeller::TraceSerializer::Write | ( | const SamplerDescriptor & | sampler | ) |

Definition at line 216 of file trace_serializer.cc.

216 {
217 buffer_ << "[SamplerDescriptor] ";
218 }

## ◆ Write() [11/22]

void impeller::TraceSerializer::Write | ( | const std::optional< Rect > | optional_rect | ) |

Definition at line 168 of file trace_serializer.cc.

168 {
169 if (optional_rect.has_value()) {
170 buffer_ << "[" << optional_rect.value() << "] ";
171 } else {
172 buffer_ << "[None] ";
173 }
174 }

## ◆ Write() [12/22]

void impeller::TraceSerializer::Write | ( | const std::shared_ptr< Image > & | image | ) |

Definition at line 212 of file trace_serializer.cc.

212 {
213 buffer_ << "[std::shared_ptr<Image>] ";
214 }

## ◆ Write() [13/22]

void impeller::TraceSerializer::Write | ( | const std::shared_ptr< ImageFilter > & | image_filter | ) |

Definition at line 176 of file trace_serializer.cc.

176 {
177 buffer_ << image_filter << " ";
178 }

## ◆ Write() [14/22]

void impeller::TraceSerializer::Write | ( | const std::shared_ptr< TextFrame > & | text_frame | ) |

Definition at line 235 of file trace_serializer.cc.

235 {
236 buffer_ << "[std::shared_ptr<TextFrame>] ";
237 }

## ◆ Write() [15/22]

void impeller::TraceSerializer::Write | ( | const std::shared_ptr< VerticesGeometry > & | vertices | ) |

Definition at line 239 of file trace_serializer.cc.

239 {
240 buffer_ << "[std::shared_ptr<VerticesGeometry>] ";
241 }

## ◆ Write() [16/22]

void impeller::TraceSerializer::Write | ( | const std::vector< Color > & | matrices | ) |

Definition at line 255 of file trace_serializer.cc.

255 {
256 buffer_ << "[std::vector<Color>] ";
257 }

## ◆ Write() [17/22]

void impeller::TraceSerializer::Write | ( | const std::vector< Matrix > & | matrices | ) |

Definition at line 247 of file trace_serializer.cc.

247 {
248 buffer_ << "[std::vector<Matrix>] ";
249 }

## ◆ Write() [18/22]

void impeller::TraceSerializer::Write | ( | const std::vector< Point > & | points | ) |

Definition at line 204 of file trace_serializer.cc.

204 {
205 buffer_ << "[std::vector<Point>] ";
206 }

## ◆ Write() [19/22]

void impeller::TraceSerializer::Write | ( | const std::vector< Rect > & | matrices | ) |

Definition at line 251 of file trace_serializer.cc.

251 {
252 buffer_ << "[std::vector<Rect>] ";
253 }

## ◆ Write() [20/22]

void impeller::TraceSerializer::Write | ( | const Vector2 & | vec2 | ) |

Definition at line 192 of file trace_serializer.cc.

192 {
193 buffer_ << "[" << vec2 << "] ";
194 }

## ◆ Write() [21/22]

void impeller::TraceSerializer::Write | ( | const Vector3 & | vec3 | ) |

Definition at line 188 of file trace_serializer.cc.

188 {
189 buffer_ << "[" << vec3 << "] ";
190 }

## ◆ Write() [22/22]

void impeller::TraceSerializer::Write | ( | size_t | size | ) |

Definition at line 180 of file trace_serializer.cc.

180 {
181 buffer_ << "[" << size << "] ";
182 }

The documentation for this class was generated from the following files:

- impeller/aiks/trace_serializer.h
- impeller/aiks/trace_serializer.cc

impeller::Entity::ClipOperation::kIntersect
@ kIntersect
impeller::BlendModeToString
const char * BlendModeToString(BlendMode blend_mode)
Definition: color.cc:47
impeller::Entity::ClipOperation::kDifference
@ kDifference
impeller::kNew
@ kNew
Definition: canvas_recorder.h:20