void SetSamplerDescriptor(SamplerDescriptor desc)
void SetOpacity(Scalar opacity)
void SetInheritedOpacity(Scalar opacity) override
Inherit the provided opacity.
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the screen space bounding rectangle that this contents affects.
void SetSourceRect(const Rect &source_rect)
void SetStencilEnabled(bool enabled)
Scalar GetOpacity() const
~TextureContents() override
const Rect & GetSourceRect() const
bool CanInheritOpacity(const Entity &entity) const override
Whether or not this contents can accept the opacity peephole optimization.
void SetLabel(std::string label)
std::shared_ptr< Texture > GetTexture() const
void SetDeferApplyingOpacity(bool defer_applying_opacity)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetTexture(std::shared_ptr< Texture > texture)
void SetDestinationRect(Rect rect)
static std::shared_ptr< TextureContents > MakeRect(Rect destination)
A common case factory that marks the texture contents as having a destination rectangle....
const SamplerDescriptor & GetSamplerDescriptor() const
std::optional< Snapshot > RenderToSnapshot(const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit=std::nullopt, const std::optional< SamplerDescriptor > &sampler_descriptor=std::nullopt, bool msaa_enabled=true, const std::string &label="Texture Snapshot") const override
Render this contents to a snapshot, respecting the entity's transform, path, stencil depth,...