5#ifndef FLUTTER_IMPELLER_AIKS_CANVAS_H_
6#define FLUTTER_IMPELLER_AIKS_CANVAS_H_
76 std::optional<Rect>
bounds = std::nullopt,
77 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr,
80 bool can_distribute_opacity =
false);
121 const Size& corner_radii,
137 const std::shared_ptr<Image>&
image,
158 const Size& corner_radii,
161 virtual void DrawTextFrame(
const std::shared_ptr<TextFrame>& text_frame,
165 void DrawVertices(
const std::shared_ptr<VerticesGeometry>& vertices,
170 std::vector<Matrix> transforms,
171 std::vector<Rect> texture_coordinates,
172 std::vector<Color>
colors,
174 SamplerDescriptor sampler,
175 std::optional<Rect> cull_rect,
187 void Initialize(std::optional<Rect> cull_rect);
192 std::unique_ptr<EntityPass> base_pass_;
198 bool reuse_depth =
false);
201 void ClipGeometry(
const std::shared_ptr<Geometry>& geometry,
204 void IntersectCulling(
Rect clip_bounds);
205 void SubtractCulling(
Rect clip_bounds);
209 uint32_t total_content_depth,
211 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr);
215 bool AttemptDrawBlurredRRect(
const Rect&
rect,
static const int points[]
void DrawLine(const Point &p0, const Point &p1, const Paint &paint)
static constexpr uint32_t kMaxDepth
void Initialize(std::optional< Rect > cull_rect)
const Matrix & GetCurrentTransform() const
void DrawImageRect(const std::shared_ptr< Image > &image, Rect source, Rect dest, const Paint &paint, SamplerDescriptor sampler={}, SourceRectConstraint src_rect_constraint=SourceRectConstraint::kFast)
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
void DrawOval(const Rect &rect, const Paint &paint)
void RestoreToCount(size_t count)
void ClipPath(const Path &path, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
virtual void AddClipEntityToCurrentPass(Entity entity)
size_t GetClipHeight() const
void ClipRRect(const Rect &rect, const Size &corner_radii, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
size_t GetSaveCount() const
void Concat(const Matrix &transform)
void Transform(const Matrix &transform)
std::optional< Rect > initial_cull_rect_
void PreConcat(const Matrix &transform)
virtual void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown, uint32_t total_content_depth=kMaxDepth, bool can_distribute_opacity=false)
void DrawImage(const std::shared_ptr< Image > &image, Point offset, const Paint &paint, SamplerDescriptor sampler={})
void Rotate(Radians radians)
std::deque< CanvasStackEntry > transform_stack_
virtual void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
void DrawPaint(const Paint &paint)
void ClipRect(const Rect &rect, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void Skew(Scalar sx, Scalar sy)
void Scale(const Vector2 &scale)
const std::optional< Rect > GetCurrentLocalCullingBounds() const
Picture EndRecordingAsPicture()
void DrawPath(const Path &path, const Paint &paint)
virtual void Save(uint32_t total_content_depth=kMaxDepth)
void DrawPoints(std::vector< Point > points, Scalar radius, const Paint &paint, PointStyle point_style)
void ClipOval(const Rect &bounds, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void DrawRect(const Rect &rect, const Paint &paint)
void DrawRRect(const Rect &rect, const Size &corner_radii, const Paint &paint)
virtual void AddRenderEntityToCurrentPass(Entity entity, bool reuse_depth=false)
void DrawAtlas(const std::shared_ptr< Image > &atlas, std::vector< Matrix > transforms, std::vector< Rect > texture_coordinates, std::vector< Color > colors, BlendMode blend_mode, SamplerDescriptor sampler, std::optional< Rect > cull_rect, const Paint &paint)
void Translate(const Vector3 &offset)
void DrawCircle(const Point ¢er, Scalar radius, const Paint &paint)
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
sk_sp< const SkImage > atlas
Optional< SkRect > bounds
sk_sp< const SkImage > image
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
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
SourceRectConstraint
Controls the behavior of the source rectangle given to DrawImageRect.
@ kStrict
Sample only within the source rectangle. May be slower.
@ kFast
Faster, but may sample outside the bounds of the source rectangle.
@ kUnknown
The caller makes no claims related to the size of the bounds.
SK_API sk_sp< PrecompileShader > Picture()
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Entity::RenderingMode rendering_mode
std::optional< Rect > cull_rect
Scalar distributed_opacity
A 4x4 matrix using column-major storage.