[Impeller] disabling the color write mask seems to improve performance on iOS compared to just the blend options. (flutter/engine#53322)

Otherwise should be semantically equivalent/no-op.
This commit is contained in:
Jonah Williams
2024-06-11 19:14:00 -07:00
committed by GitHub
parent d791caa8c3
commit c6a811e2e5

View File

@@ -40,6 +40,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
color0.format = color_attachment_pixel_format;
color0.alpha_blend_op = BlendOperation::kAdd;
color0.color_blend_op = BlendOperation::kAdd;
color0.write_mask = ColorWriteMaskBits::kAll;
switch (pipeline_blend) {
case BlendMode::kClear:
@@ -69,6 +70,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
color0.dst_color_blend_factor = BlendFactor::kOne;
color0.src_alpha_blend_factor = BlendFactor::kZero;
color0.src_color_blend_factor = BlendFactor::kZero;
color0.write_mask = ColorWriteMaskBits::kNone;
break;
case BlendMode::kSourceOver:
color0.dst_alpha_blend_factor = BlendFactor::kOneMinusSourceAlpha;