5#ifndef FLUTTER_IMPELLER_AIKS_CANVAS_H_
6#define FLUTTER_IMPELLER_AIKS_CANVAS_H_
83 std::optional<Rect> bounds = std::nullopt,
84 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr,
86 uint32_t total_content_depth =
kMaxDepth);
127 const Size& corner_radii,
143 const std::shared_ptr<Image>&
image,
164 const Size& corner_radii,
167 virtual void DrawTextFrame(
const std::shared_ptr<TextFrame>& text_frame,
171 void DrawVertices(
const std::shared_ptr<VerticesGeometry>& vertices,
175 void DrawAtlas(
const std::shared_ptr<Image>& atlas,
176 std::vector<Matrix> transforms,
177 std::vector<Rect> texture_coordinates,
178 std::vector<Color> colors,
180 SamplerDescriptor sampler,
181 std::optional<Rect> cull_rect,
193 void Initialize(std::optional<Rect> cull_rect);
198 std::unique_ptr<EntityPass> base_pass_;
204 bool reuse_depth =
false);
207 void ClipGeometry(
const std::shared_ptr<Geometry>& geometry,
210 void IntersectCulling(
Rect clip_bounds);
211 void SubtractCulling(
Rect clip_bounds);
215 uint32_t total_content_depth,
217 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr);
221 bool AttemptDrawBlurredRRect(
const Rect& rect,
static const int points[]
static SkScalar center(float pos0, float pos1)
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)
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)
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)
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 Skew(Scalar sx, Scalar sy)
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)
struct impeller::Canvas::DebugOptions debug_options
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
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.
@ kRound
Points are drawn as squares.
@ kSquare
Points are drawn as circles.
@ kUnknown
The caller makes no claims related to the size of the bounds.
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Entity::RenderingMode rendering_mode
std::optional< Rect > cull_rect
bool offscreen_texture_checkerboard
A 4x4 matrix using column-major storage.