5#ifndef FLUTTER_IMPELLER_ENTITY_GEOMETRY_SHADOW_PATH_GEOMETRY_H_
6#define FLUTTER_IMPELLER_ENTITY_GEOMETRY_SHADOW_PATH_GEOMETRY_H_
26 static const std::shared_ptr<ShadowVertices>
kEmpty;
28 static std::shared_ptr<ShadowVertices>
Make(std::vector<Point> vertices,
29 std::vector<uint16_t> indices,
30 std::vector<Scalar> gaussians) {
31 return std::make_shared<ShadowVertices>(
32 std::move(vertices), std::move(indices), std::move(gaussians));
38 std::vector<uint16_t> indices,
39 std::vector<Scalar> gaussians)
40 : vertices_(
std::move(vertices)),
41 indices_(
std::move(indices)),
42 gaussians_(
std::move(gaussians)) {}
52 const std::vector<Point>&
GetVertices()
const {
return vertices_; }
53 const std::vector<uint16_t>&
GetIndices()
const {
return indices_; }
54 const std::vector<Scalar>&
GetGaussians()
const {
return gaussians_; }
58 bool IsEmpty()
const {
return vertices_.empty(); }
67 const std::vector<Point> vertices_;
68 const std::vector<uint16_t> indices_;
69 const std::vector<Scalar> gaussians_;
111 std::shared_ptr<ShadowVertices> shadow_vertices_;
Render passes encode render commands directed as one specific render target into an underlying comman...
const std::shared_ptr< ShadowVertices > & GetShadowVertices() const
bool IsEmpty() const
Returns true if this shadow has no effect, is not visible.
const std::shared_ptr< ShadowVertices > TakeShadowVertices()
static std::shared_ptr< ShadowVertices > MakeAmbientShadowVertices(Tessellator &tessellator, const PathSource &source, Scalar occluder_height, const Matrix &matrix)
size_t GetVertexCount() const
std::optional< Rect > GetBounds() const
static const std::shared_ptr< ShadowVertices > kEmpty
static std::shared_ptr< ShadowVertices > Make(std::vector< Point > vertices, std::vector< uint16_t > indices, std::vector< Scalar > gaussians)
constexpr ShadowVertices(std::vector< Point > vertices, std::vector< uint16_t > indices, std::vector< Scalar > gaussians)
const std::vector< Point > & GetVertices() const
const std::vector< Scalar > & GetGaussians() const
const std::vector< uint16_t > & GetIndices() const
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const
size_t GetIndexCount() const
The count of the indices that define the mesh.
constexpr ShadowVertices()
A utility that generates triangles of the specified fill type given a polyline. This happens on the C...
A 4x4 matrix using column-major storage.