| Flutter Impeller |

trace_serializer.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_AIKS_TRACE_SERIALIZER_H_
6 #define FLUTTER_IMPELLER_AIKS_TRACE_SERIALIZER_H_
7
8 #include <iostream>
9 #include "impeller/aiks/canvas_recorder.h"
10
11 namespace impeller {
12
13 class TraceSerializer {
14 public:
15 TraceSerializer();
16
17 void Write(CanvasRecorderOp op);
18
19 void Write(const Paint& paint);
20
21 void Write(const std::optional<Rect> optional_rect);
22
23 void Write(const std::shared_ptr<ImageFilter>& image_filter);
24
25 void Write(size_t size);
26
27 void Write(const Matrix& matrix);
28
29 void Write(const Vector3& vec3);
30
31 void Write(const Vector2& vec2);
32
33 void Write(const Radians& vec2);
34
35 void Write(const Path& path);
36
37 void Write(const std::vector<Point>& points);
38
39 void Write(const PointStyle& point_style);
40
41 void Write(const std::shared_ptr<Image>& image);
42
43 void Write(const SamplerDescriptor& sampler);
44
45 void Write(const Entity::ClipOperation& clip_op);
46
47 void Write(const Picture& clip_op);
48
49 void Write(const std::shared_ptr<TextFrame>& text_frame);
50
51 void Write(const std::shared_ptr<VerticesGeometry>& vertices);
52
53 void Write(const BlendMode& blend_mode);
54
55 void Write(const std::vector<Matrix>& matrices);
56
57 void Write(const std::vector<Rect>& matrices);
58
59 void Write(const std::vector<Color>& matrices);
60
61 void Write(const SourceRectConstraint& src_rect_constraint);
62
63 void Write(const ContentBoundsPromise& promise);
64
65 private:
66 std::stringstream buffer_;
67 };
68
69 } // namespace impeller
70
71 #endif // FLUTTER_IMPELLER_AIKS_TRACE_SERIALIZER_H_
impeller::Paint
Definition: paint.h:23
impeller::BlendMode
BlendMode
Definition: color.h:59
impeller::PointStyle
PointStyle
Definition: canvas.h:41
impeller::ContentBoundsPromise
ContentBoundsPromise
Definition: entity_pass.h:28
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:15
canvas_recorder.h
impeller::Picture
Definition: picture.h:20
impeller::Path
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
Definition: path.h:51
impeller::SourceRectConstraint
SourceRectConstraint
Controls the behavior of the source rectangle given to DrawImageRect.
Definition: canvas.h:50
impeller::Radians
Definition: scalar.h:38
impeller::TPoint< Scalar >
impeller::TraceSerializer
Definition: trace_serializer.h:13
impeller::Entity::ClipOperation
ClipOperation
Definition: entity.h:61
impeller::TraceSerializer::TraceSerializer
TraceSerializer()
Definition: trace_serializer.cc:150
impeller
Definition: aiks_blur_unittests.cc:20
impeller::CanvasRecorderOp
CanvasRecorderOp
Definition: canvas_recorder.h:19
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::Vector3
Definition: vector.h:20
impeller::TraceSerializer::Write
void Write(CanvasRecorderOp op)
Definition: trace_serializer.cc:152