Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions impeller/aiks/picture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ std::shared_ptr<Texture> Picture::RenderToTexture(
"Picture Snapshot MSAA", // label
RenderTarget::
kDefaultColorAttachmentConfigMSAA, // color_attachment_config
std::nullopt // stencil_attachment_config
RenderTarget::
kDefaultStencilAttachmentConfig // stencil_attachment_config
);
} else {
target = render_target_allocator.CreateOffscreen(
Expand All @@ -76,7 +77,8 @@ std::shared_ptr<Texture> Picture::RenderToTexture(
/*mip_count=*/1,
"Picture Snapshot", // label
RenderTarget::kDefaultColorAttachmentConfig, // color_attachment_config
std::nullopt // stencil_attachment_config
RenderTarget::
kDefaultStencilAttachmentConfig // stencil_attachment_config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just these changes in picture.cc are needed to get us over the line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining backdrop blur goldens for GLES were fixed with #51173

);
}
if (!target.IsValid()) {
Expand Down
2 changes: 1 addition & 1 deletion impeller/entity/contents/content_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class ContentContext {
///
// TODO(bdero): Remove this setting once StC is fully de-risked
// https://github.com/flutter/flutter/issues/123671
static constexpr bool kEnableStencilThenCover = false;
static constexpr bool kEnableStencilThenCover = true;

#if IMPELLER_ENABLE_3D
std::shared_ptr<scene::SceneContext> GetSceneContext() const;
Expand Down
2 changes: 1 addition & 1 deletion impeller/entity/entity_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ bool EntityPass::RenderElement(Entity& element_entity,
Entity msaa_backdrop_entity;
msaa_backdrop_entity.SetContents(std::move(msaa_backdrop_contents));
msaa_backdrop_entity.SetBlendMode(BlendMode::kSource);
msaa_backdrop_entity.SetNewClipDepth(std::numeric_limits<uint32_t>::max());
msaa_backdrop_entity.SetNewClipDepth(1000); // Just set a big number.
if (!msaa_backdrop_entity.Render(renderer, *result.pass)) {
VALIDATION_LOG << "Failed to render MSAA backdrop filter entity.";
return false;
Expand Down
22 changes: 11 additions & 11 deletions impeller/entity/inline_pass_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,17 @@ InlinePassContext::RenderPassResult InlinePassContext::GetRenderPass(
color0.store_action =
is_msaa ? StoreAction::kMultisampleResolve : StoreAction::kStore;

if (ContentContext::kEnableStencilThenCover) {
auto depth = pass_target_.GetRenderTarget().GetDepthAttachment();
if (!depth.has_value()) {
VALIDATION_LOG << "Depth attachment unexpectedly missing from the "
"EntityPass render target.";
return {};
}
depth->load_action = LoadAction::kClear;
depth->store_action = StoreAction::kDontCare;
pass_target_.target_.SetDepthAttachment(depth.value());
}
// if (ContentContext::kEnableStencilThenCover) {
// auto depth = pass_target_.GetRenderTarget().GetDepthAttachment();
// if (!depth.has_value()) {
// VALIDATION_LOG << "Depth attachment unexpectedly missing from the "
// "EntityPass render target.";
// return {};
// }
// depth->load_action = LoadAction::kClear;
// depth->store_action = StoreAction::kDontCare;
// pass_target_.target_.SetDepthAttachment(depth.value());
// }

auto depth = pass_target_.GetRenderTarget().GetDepthAttachment();
auto stencil = pass_target_.GetRenderTarget().GetStencilAttachment();
Expand Down