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 return contents_->ShouldRender(*
this, stencil_coverage);
78 contents_ = std::move(contents);
86 stencil_depth_ = depth;
90 return stencil_depth_;
94 stencil_depth_ += increment;
98 blend_mode_ = blend_mode;
113 return contents_->CanInheritOpacity(*
this);
123 contents_->SetInheritedOpacity(alpha);
128 return contents_->AsBackgroundColor(*
this, target_size);
139 switch (blend_mode) {
161 if (!contents_->GetCoverageHint().has_value()) {
162 contents_->SetCoverageHint(
166 return contents_->Render(renderer, *
this, parent_pass);
178 capture_ = std::move(capture);