12 ContentsFilterInput::ContentsFilterInput(std::shared_ptr<Contents> contents,
14 : contents_(
std::move(contents)), msaa_enabled_(msaa_enabled) {}
16 ContentsFilterInput::~ContentsFilterInput() =
default;
18 std::optional<Snapshot> ContentsFilterInput::GetSnapshot(
19 std::string_view label,
22 std::optional<Rect> coverage_limit,
23 int32_t mip_count)
const {
24 if (!coverage_limit.has_value() && entity.
GetContents()) {
25 coverage_limit = entity.
GetContents()->GetCoverageHint();
27 if (!snapshot_.has_value()) {
29 contents_->RenderToSnapshot(renderer,
32 .coverage_limit = coverage_limit,
33 .sampler_descriptor = std::nullopt,
34 .msaa_enabled = msaa_enabled_,
35 .mip_count = mip_count,
42 std::optional<Rect> ContentsFilterInput::GetCoverage(
43 const Entity& entity)
const {
44 return contents_->GetCoverage(entity);
const std::shared_ptr< Contents > & GetContents() const