22 const std::optional<Snapshot>& snapshot,
24 uint32_t stencil_depth) {
25 if (!snapshot.has_value()) {
32 contents->SetTexture(snapshot->texture);
33 contents->SetSamplerDescriptor(snapshot->sampler_descriptor);
34 contents->SetSourceRect(texture_rect);
35 contents->SetOpacity(snapshot->opacity);
50 return transformation_;
54 transformation_ = transformation;
62 return contents_->GetCoverage(*
this);
66 const std::optional<Rect>& current_stencil_coverage)
const {
70 return contents_->GetStencilCoverage(*
this, current_stencil_coverage);
74 #ifdef IMPELLER_CONTENT_CULLING
75 return contents_->ShouldRender(*
this, stencil_coverage);
78 #endif // IMPELLER_CONTENT_CULLING
82 contents_ = std::move(contents);
90 stencil_depth_ = depth;
94 return stencil_depth_;
98 stencil_depth_ += increment;
102 blend_mode_ = blend_mode;
117 return contents_->CanInheritOpacity(*
this);
127 contents_->SetInheritedOpacity(alpha);
132 return contents_->AsBackgroundColor(*
this, target_size);
143 switch (blend_mode) {
165 if (!contents_->GetCoverageHint().has_value()) {
166 contents_->SetCoverageHint(
170 return contents_->Render(renderer, *
this, parent_pass);
182 capture_ = std::move(capture);