16 : inner_rect_(inner_rect) {}
28 if (bounding_box.IsEmpty()) {
41 bool supports_primitive_restart =
43 bool supports_triangle_fan =
45 supports_primitive_restart;
47 GetSource(), data_host_buffer, indexes_host_buffer,
49 supports_primitive_restart,
50 supports_triangle_fan);
52 return GeometryResult{
57 .mode = GetResultMode(),
63 const auto& bounding_box = source.GetBounds();
64 if (source.IsConvex() || bounding_box.IsEmpty()) {
68 switch (source.GetFillType()) {
78std::optional<Rect> FillPathSourceGeometry::GetCoverage(
84 const Rect& rect)
const {
85 if (!inner_rect_.has_value()) {
88 if (!
transform.IsTranslationScaleOnly()) {
96 std::optional<Rect> inner_rect)
virtual bool SupportsTriangleFan() const =0
Whether the primitive type TriangleFan is supported by the backend.
virtual bool SupportsPrimitiveRestart() const =0
Whether primitive restart is supported.
HostBuffer & GetTransientsDataBuffer() const
Retrieve the current host buffer for transient storage of other non-index data.
const Capabilities & GetDeviceCapabilities() const
HostBuffer & GetTransientsIndexesBuffer() const
Retrieve the current host buffer for transient storage of indexes used for indexed draws.
Tessellator & GetTessellator() const
Matrix GetShaderTransform(const RenderPass &pass) const
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
const PathSource & GetSource() const override
FillDiffRoundRectGeometry(const RoundRect &outer, const RoundRect &inner)
FillPathGeometry(const flutter::DlPath &path, std::optional< Rect > inner_rect=std::nullopt)
const PathSource & GetSource() const override
An abstract Geometry base class that produces fillable vertices for the interior of any |PathSource| ...
FillPathSourceGeometry(std::optional< Rect > inner_rect)
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
~FillPathSourceGeometry() override
virtual const PathSource & GetSource() const =0
virtual Rect GetBounds() const =0
Render passes encode render commands directed as one specific render target into an underlying comman...
const Matrix & GetOrthographicTransform() const
VertexBuffer TessellateConvex(const PathSource &path, HostBuffer &data_host_buffer, HostBuffer &indexes_host_buffer, Scalar tolerance, bool supports_primitive_restart=false, bool supports_triangle_fan=false)
Given a convex path, create a triangle fan structure.
#define FML_UNREACHABLE()
@ kNormal
The geometry has no overlapping triangles.
A 4x4 matrix using column-major storage.
Scalar GetMaxBasisLengthXY() const
Return the maximum scale applied specifically to either the X axis or Y axis unit vectors (the bases)...
constexpr bool Contains(const TPoint< Type > &p) const
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
constexpr TRect TransformAndClipBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle, clipped against the near clippin...