Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3e9928e

Browse files
authored
[Impeller] Enable depth buffer clipping & Stencil-then-Cover path rendering. (#50856)
Turn the page, wash your hands. Addresses the following issues: * flutter/flutter#143077 * flutter/flutter#137714 * flutter/flutter#138460 * flutter/flutter#123671 * flutter/flutter#141961 * flutter/flutter#134432
1 parent d514a30 commit 3e9928e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

impeller/aiks/picture.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,15 @@ std::shared_ptr<Texture> Picture::RenderToTexture(
6666
/*mip_count=*/1,
6767
"Picture Snapshot MSAA", // label
6868
RenderTarget::
69-
kDefaultColorAttachmentConfigMSAA, // color_attachment_config
70-
std::nullopt // stencil_attachment_config
69+
kDefaultColorAttachmentConfigMSAA // color_attachment_config
7170
);
7271
} else {
7372
target = render_target_allocator.CreateOffscreen(
7473
*impeller_context, // context
7574
size, // size
7675
/*mip_count=*/1,
77-
"Picture Snapshot", // label
78-
RenderTarget::kDefaultColorAttachmentConfig, // color_attachment_config
79-
std::nullopt // stencil_attachment_config
76+
"Picture Snapshot", // label
77+
RenderTarget::kDefaultColorAttachmentConfig // color_attachment_config
8078
);
8179
}
8280
if (!target.IsValid()) {

impeller/entity/contents/content_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ class ContentContext {
408408
///
409409
// TODO(bdero): Remove this setting once StC is fully de-risked
410410
// https://github.com/flutter/flutter/issues/123671
411-
static constexpr bool kEnableStencilThenCover = false;
411+
static constexpr bool kEnableStencilThenCover = true;
412412

413413
#if IMPELLER_ENABLE_3D
414414
std::shared_ptr<scene::SceneContext> GetSceneContext() const;

0 commit comments

Comments
 (0)