14ContentsFilterInput::ContentsFilterInput(std::shared_ptr<Contents> contents,
16 : contents_(
std::move(contents)), msaa_enabled_(msaa_enabled) {}
18ContentsFilterInput::~ContentsFilterInput() =
default;
24std::optional<Snapshot> ContentsFilterInput::GetSnapshot(
25 const std::string& label,
28 std::optional<Rect> coverage_limit,
29 int32_t mip_count)
const {
30 if (!coverage_limit.has_value() && entity.
GetContents()) {
31 coverage_limit = entity.
GetContents()->GetCoverageHint();
33 if (!snapshot_.has_value()) {
34 snapshot_ = contents_->RenderToSnapshot(
41 SPrintF(
"Contents to %s Filter Snapshot", label.c_str()));
46std::optional<Rect> ContentsFilterInput::GetCoverage(
47 const Entity& entity)
const {
48 return contents_->GetCoverage(entity);
51void ContentsFilterInput::PopulateGlyphAtlas(
52 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
54 contents_->PopulateGlyphAtlas(lazy_glyph_atlas,
scale);
const std::shared_ptr< Contents > & GetContents() const
std::string SPrintF(const char *format,...)