36 std::shared_ptr<Texture>
target,
37 const Matrix& effect_transform) {
39 contents->SetTexture(
target);
40 contents->SetLabel(
"Subpass");
43 contents->SetDeferApplyingOpacity(
true);
52 const Matrix& effect_transform)
const {
102 bool all_can_accept =
true;
103 std::vector<Rect> all_coverages;
105 [&all_coverages, &all_can_accept](
Entity& entity) {
108 all_can_accept = false;
111 auto maybe_coverage = contents->GetCoverage(entity);
112 if (maybe_coverage.has_value()) {
113 auto coverage = maybe_coverage.value();
114 for (
const auto& cv : all_coverages) {
115 if (cv.IntersectsWithRect(coverage)) {
116 all_can_accept =
false;
120 all_coverages.push_back(coverage);
124 if (had_subpass || !all_can_accept) {
136std::shared_ptr<Contents>
138 std::shared_ptr<Texture>
target,
139 const Matrix& effect_transform) {
141 contents->SetLabel(
"Subpass");
142 contents->SetTexture(
target);
145 contents->SetDeferApplyingOpacity(
true);
154 const Matrix& effect_transform)
const {
bool IterateUntilSubpass(const std::function< bool(Entity &)> &iterator)
Iterate entities in this pass up until the first subpass is found. This is useful for limiting look-a...
size_t GetElementCount() const
Return the number of elements on this pass.
bool GetBoundsLimitMightClipContent() const
Indicates if the bounds limit set using |SetBoundsLimit()| might clip the contents of the pass.
bool CanInheritOpacity() const
bool SetInheritedOpacity(Scalar alpha)
const std::shared_ptr< Contents > & GetContents() const
OpacityPeepholePassDelegate(Paint paint)
~OpacityPeepholePassDelegate() override
std::shared_ptr< Contents > CreateContentsForSubpassTarget(std::shared_ptr< Texture > target, const Matrix &effect_transform) override
bool CanCollapseIntoParentPass(EntityPass *entity_pass) override
Whether or not this entity pass can be collapsed into the parent. If true, this method may modify the...
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform) const override
~PaintPassDelegate() override
bool CanCollapseIntoParentPass(EntityPass *entity_pass) override
Whether or not this entity pass can be collapsed into the parent. If true, this method may modify the...
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform) const override
PaintPassDelegate(Paint paint)
std::shared_ptr< Contents > CreateContentsForSubpassTarget(std::shared_ptr< Texture > target, const Matrix &effect_transform) override
static std::shared_ptr< TextureContents > MakeRect(Rect destination)
A common case factory that marks the texture contents as having a destination rectangle....
A 4x4 matrix using column-major storage.
std::shared_ptr< ImageFilter > image_filter
std::shared_ptr< Contents > WithFiltersForSubpassTarget(std::shared_ptr< Contents > input, const Matrix &effect_transform=Matrix()) const
Wrap this paint's configured filters to the given contents of subpass target.
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform, Entity::RenderingMode rendering_mode) const
std::shared_ptr< ColorFilter > color_filter
static constexpr TRect MakeSize(const TSize< U > &size)