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

Commit 8a60785

Browse files
committed
got stencil then cover working and turned back on *sigh*
1 parent aa91d6c commit 8a60785

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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;

impeller/entity/contents/filters/gaussian_blur_filter_contents.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Entity ApplyBlurStyle(FilterContents::BlurStyle blur_style,
265265
input, input_snapshot,
266266
std::move(blur_entity), geometry);
267267
case FilterContents::BlurStyle::kSolid: {
268-
Entity blurred = ApplyClippedBlurStyle(Entity::ClipOperation::kIntersect,
268+
Entity blurred = ApplyClippedBlurStyle(Entity::ClipOperation::kDifference,
269269
entity, input, input_snapshot,
270270
std::move(blur_entity), geometry);
271271
Entity snapshot_entity = Entity::FromSnapshot(
@@ -278,8 +278,11 @@ Entity ApplyBlurStyle(FilterContents::BlurStyle blur_style,
278278
const ContentContext& renderer,
279279
const Entity& entity,
280280
RenderPass& pass) mutable {
281-
return blurred.Render(renderer, pass) &&
282-
snapshot_entity.Render(renderer, pass);
281+
bool result = true;
282+
result = result && blurred.Render(renderer, pass);
283+
snapshot_entity.SetNewClipDepth(entity.GetNewClipDepth());
284+
result = result && snapshot_entity.Render(renderer, pass);
285+
return result;
283286
}),
284287
fml::MakeCopyable(
285288
[coverage](const Entity& entity) { return coverage; })));

0 commit comments

Comments
 (0)