7 #include "fml/logging.h"
16 : inner_rect_(inner_rect) {}
27 if (bounding_box.IsEmpty()) {
40 bool supports_primitive_restart =
42 bool supports_triangle_fan =
44 supports_primitive_restart;
47 supports_primitive_restart,
48 supports_triangle_fan);
50 return GeometryResult{
53 .vertex_buffer = std::move(vertex_buffer),
55 .mode = GetResultMode(),
61 const auto& bounding_box = source.GetBounds();
62 if (source.IsConvex() || bounding_box.IsEmpty()) {
66 switch (source.GetFillType()) {
76 std::optional<Rect> FillPathSourceGeometry::GetCoverage(
82 const Rect& rect)
const {
83 if (!inner_rect_.has_value()) {
86 if (!
transform.IsTranslationScaleOnly()) {
94 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 & GetTransientsBuffer() const
Retrieve the currnent host buffer for transient storage.
const Capabilities & GetDeviceCapabilities() const
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...
virtual const PathSource & GetSource() const =0
~FillPathSourceGeometry() override
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 &host_buffer, Scalar tolerance, bool supports_primitive_restart=false, bool supports_triangle_fan=false)
Given a convex path, create a triangle fan structure.
@ kNormal
The geometry has no overlapping triangles.
A 4x4 matrix using column-major storage.
Scalar GetMaxBasisLengthXY() const
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...