13GeometryResult CoverGeometry::GetPositionBuffer(
const ContentContext&
renderer,
15 RenderPass& pass)
const {
17 constexpr uint16_t kRectIndicies[4] = {0, 1, 2, 3};
18 auto& host_buffer =
renderer.GetTransientsBuffer();
19 return GeometryResult{
23 .vertex_buffer = host_buffer.Emplace(
24 rect.GetTransformedPoints(entity.GetTransform().Invert())
26 8 *
sizeof(
float),
alignof(
float)),
27 .index_buffer = host_buffer.Emplace(
28 kRectIndicies, 4 *
sizeof(uint16_t),
alignof(uint16_t)),
32 .transform = entity.GetShaderTransform(pass),
36std::optional<Rect> CoverGeometry::GetCoverage(
const Matrix&
transform)
const {
bool CanApplyMaskFilter() const override
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...
sk_sp< SkBlender > blender SkRect rect
SK_API sk_sp< PrecompileColorFilter > Matrix()
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
A 4x4 matrix using column-major storage.
static constexpr TRect MakeSize(const TSize< U > &size)
static constexpr TRect MakeMaximum()