14FilterContentsFilterInput::FilterContentsFilterInput(
15 std::shared_ptr<FilterContents> filter)
16 : filter_(
std::move(filter)) {}
18FilterContentsFilterInput::~FilterContentsFilterInput() =
default;
24std::optional<Snapshot> FilterContentsFilterInput::GetSnapshot(
25 const std::string& label,
28 std::optional<Rect> coverage_limit,
29 int32_t mip_count)
const {
30 if (!snapshot_.has_value()) {
31 snapshot_ = filter_->RenderToSnapshot(
38 SPrintF(
"Filter to %s Filter Snapshot", label.c_str()));
43std::optional<Rect> FilterContentsFilterInput::GetCoverage(
44 const Entity& entity)
const {
45 return filter_->GetCoverage(entity);
48std::optional<Rect> FilterContentsFilterInput::GetSourceCoverage(
49 const Matrix& effect_transform,
50 const Rect& output_limit)
const {
51 return filter_->GetSourceCoverage(effect_transform, output_limit);
54Matrix FilterContentsFilterInput::GetLocalTransform(
55 const Entity& entity)
const {
56 return filter_->GetLocalTransform(entity.
GetTransform());
59Matrix FilterContentsFilterInput::GetTransform(
const Entity& entity)
const {
63void FilterContentsFilterInput::PopulateGlyphAtlas(
64 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
66 filter_->PopulateGlyphAtlas(lazy_glyph_atlas,
scale);
69bool FilterContentsFilterInput::IsTranslationOnly()
const {
70 return filter_->IsTranslationOnly();
73bool FilterContentsFilterInput::IsLeaf()
const {
77void FilterContentsFilterInput::SetLeafInputs(
79 filter_->SetLeafInputs(
inputs);
82void FilterContentsFilterInput::SetEffectTransform(
const Matrix&
matrix) {
83 filter_->SetEffectTransform(
matrix);
86void FilterContentsFilterInput::SetRenderingMode(
88 filter_->SetRenderingMode(rendering_mode);
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
unsigned useCenter Optional< SkMatrix > matrix
std::string SPrintF(const char *format,...)
A 4x4 matrix using column-major storage.