Skip to content

Commit 6b2162e

Browse files
authored
Stop compiling the PorterDuffBlend kScreen variant (flutter#194538)
Stops compiling the PorterDuffBlend kScreen variant. This variant is unused, and the getter - GetScreenBlendPipeline has no callers in the codebase. When it was initially added in flutter-team-archive/engine#41098, it was also unused. Part of flutter#194511 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
1 parent ac3e968 commit 6b2162e

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

‎engine/src/flutter/impeller/entity/contents/content_context.cc‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ struct ContentContext::Pipelines {
277277
Variants<PorterDuffBlendPipeline> destination_over_blend;
278278
Variants<PorterDuffBlendPipeline> modulate_blend;
279279
Variants<PorterDuffBlendPipeline> plus_blend;
280-
Variants<PorterDuffBlendPipeline> screen_blend;
281280
Variants<PorterDuffBlendPipeline> source_a_top_blend;
282281
Variants<PorterDuffBlendPipeline> source_blend;
283282
Variants<PorterDuffBlendPipeline> source_in_blend;
@@ -509,7 +508,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
509508
desc.SetPolygonMode(PolygonMode::kFill);
510509
}
511510

512-
std::array<std::vector<Scalar>, 15> GetPorterDuffSpecConstants(
511+
std::array<std::vector<Scalar>, 14> GetPorterDuffSpecConstants(
513512
bool supports_decal) {
514513
Scalar x = supports_decal ? 1 : 0;
515514
return {{
@@ -527,7 +526,6 @@ std::array<std::vector<Scalar>, 15> GetPorterDuffSpecConstants(
527526
{x, 1, -1, 1, -1, 0}, // Xor
528527
{x, 1, 0, 1, 0, 0}, // Plus
529528
{x, 0, 0, 0, 0, 1}, // Modulate
530-
{x, 0, 0, 1, 0, -1}, // Screen
531529
}};
532530
}
533531

@@ -728,7 +726,7 @@ ContentContext::ContentContext(
728726
pipelines_->vertices_uber_2_.CreateDefault(*context_, options,
729727
{supports_decal});
730728

731-
const std::array<std::vector<Scalar>, 15> porter_duff_constants =
729+
const std::array<std::vector<Scalar>, 14> porter_duff_constants =
732730
GetPorterDuffSpecConstants(supports_decal);
733731
pipelines_->clear_blend.CreateDefault(*context_, options_trianglestrip,
734732
porter_duff_constants[0]);
@@ -758,8 +756,6 @@ ContentContext::ContentContext(
758756
porter_duff_constants[12]);
759757
pipelines_->modulate_blend.CreateDefault(*context_, options_trianglestrip,
760758
porter_duff_constants[13]);
761-
pipelines_->screen_blend.CreateDefault(*context_, options_trianglestrip,
762-
porter_duff_constants[14]);
763759
}
764760

765761
if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
@@ -1253,7 +1249,6 @@ PipelineRef ContentContext::GetPorterDuffPipeline(
12531249
case BlendMode::kModulate:
12541250
return GetModulateBlendPipeline(opts);
12551251
case BlendMode::kScreen:
1256-
return GetScreenBlendPipeline(opts);
12571252
case BlendMode::kOverlay:
12581253
case BlendMode::kDarken:
12591254
case BlendMode::kLighten:
@@ -1345,11 +1340,6 @@ PipelineRef ContentContext::GetModulateBlendPipeline(
13451340
return GetPipeline(this, pipelines_->modulate_blend, opts);
13461341
}
13471342

1348-
PipelineRef ContentContext::GetScreenBlendPipeline(
1349-
ContentContextOptions opts) const {
1350-
return GetPipeline(this, pipelines_->screen_blend, opts);
1351-
}
1352-
13531343
PipelineRef ContentContext::GetBlendColorPipeline(
13541344
ContentContextOptions opts) const {
13551345
return GetPipeline(this, pipelines_->blend_color, opts);

‎engine/src/flutter/impeller/entity/contents/content_context.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ class ContentContext {
196196
PipelineRef GetRadialGradientUniformFillPipeline(ContentContextOptions opts) const;
197197
PipelineRef GetRRectBlurPipeline(ContentContextOptions opts) const;
198198
PipelineRef GetRSuperellipseBlurPipeline(ContentContextOptions opts) const;
199-
PipelineRef GetScreenBlendPipeline(ContentContextOptions opts) const;
200199
PipelineRef GetSolidFillPipeline(ContentContextOptions opts) const;
201200
PipelineRef GetSourceATopBlendPipeline(ContentContextOptions opts) const;
202201
PipelineRef GetSourceBlendPipeline(ContentContextOptions opts) const;

0 commit comments

Comments
 (0)