29 using VT = SolidFillVertexShader::PerVertexData;
37 .vertex_buffer = renderer.GetTransientsBuffer().Emplace(
38 count *
sizeof(VT),
alignof(VT),
39 [&generator](uint8_t*
buffer) {
40 auto vertices =
reinterpret_cast<VT*
>(
buffer);
49 .vertex_count =
count,
62 std::optional<Rect> inner_rect) {
63 return std::make_shared<FillPathGeometry>(path, inner_rect);
69 return std::make_shared<PointFieldGeometry>(std::move(
points), radius,
round);
78 if (miter_limit < 0) {
81 return std::make_shared<StrokePathGeometry>(path,
stroke_width, miter_limit,
82 stroke_cap, stroke_join);
86 return std::make_shared<CoverGeometry>();
90 return std::make_shared<RectGeometry>(rect);
94 return std::make_shared<EllipseGeometry>(rect);
101 return std::make_shared<LineGeometry>(p0, p1,
width, cap);
106 return std::make_shared<CircleGeometry>(
center, radius);
117 return std::make_shared<RoundRectGeometry>(rect, radii);
static void round(SkPoint *p)
static const int points[]
static SkScalar center(float pos0, float pos1)
Matrix GetShaderTransform(const RenderPass &pass) const
Get the vertex shader transform used for drawing this Entity.
static std::shared_ptr< Geometry > MakeCover()
virtual GeometryResult::Mode GetResultMode() const
static std::shared_ptr< Geometry > MakeOval(const Rect &rect)
static std::shared_ptr< Geometry > MakeLine(const Point &p0, const Point &p1, Scalar width, Cap cap)
static std::shared_ptr< Geometry > MakeCircle(const Point ¢er, Scalar radius)
static std::shared_ptr< Geometry > MakeRect(const Rect &rect)
static std::shared_ptr< Geometry > MakePointField(std::vector< Point > points, Scalar radius, bool round)
static std::shared_ptr< Geometry > MakeRoundRect(const Rect &rect, const Size &radii)
virtual bool CanApplyMaskFilter() const
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
static std::shared_ptr< Geometry > MakeStrokePath(const Path &path, Scalar stroke_width=0.0, Scalar miter_limit=4.0, Cap stroke_cap=Cap::kButt, Join stroke_join=Join::kMiter)
static std::shared_ptr< Geometry > MakeStrokedCircle(const Point ¢er, Scalar radius, Scalar stroke_width)
virtual bool CoversArea(const Matrix &transform, const Rect &rect) const
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
static std::shared_ptr< Geometry > MakeFillPath(const Path &path, std::optional< Rect > inner_rect=std::nullopt)
virtual bool IsAxisAlignedRect() const
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
Render passes encode render commands directed as one specific render target into an underlying comman...
An object which produces a list of vertices as |Point|s that tessellate a previously provided shape a...
virtual size_t GetVertexCount() const =0
Returns the number of vertices that the generator plans to produce, if known.
virtual PrimitiveType GetTriangleType() const =0
Returns the |PrimitiveType| that describes the relationship among the list of vertices produced by th...
virtual void GenerateVertices(const TessellatedVertexProc &proc) const =0
Generate the vertices and deliver them in the necessary order (as required by the PrimitiveType) to t...
static const uint8_t buffer[]
#define FML_DCHECK(condition)
@ kNone
Does not use the index buffer.
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
const Scalar stroke_width
@ kNormal
The geometry has no overlapping triangles.
A 4x4 matrix using column-major storage.