From 03816b412cb8374912ec28debcadaea307718f8c Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Sat, 24 Jun 2023 10:30:12 -0700 Subject: [PATCH] [Impeller] Disable blending for Source blend mode (flutter/engine#43162) All of the backends already respect this property for the first color attachment in the pipeline. ~~Our Vulkan backend disables blending for a whole pipeline if the first color attachment has blending turned off.~~ This has been under our nose but I haven't checked it until now. HSR might not be working on some Vulkan & OpenGLES drivers because of this. --- engine/src/flutter/impeller/entity/contents/content_context.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/flutter/impeller/entity/contents/content_context.cc b/engine/src/flutter/impeller/entity/contents/content_context.cc index 18e2a50367..87939972b1 100644 --- a/engine/src/flutter/impeller/entity/contents/content_context.cc +++ b/engine/src/flutter/impeller/entity/contents/content_context.cc @@ -42,6 +42,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor( color0.src_color_blend_factor = BlendFactor::kZero; break; case BlendMode::kSource: + color0.blending_enabled = false; color0.dst_alpha_blend_factor = BlendFactor::kZero; color0.dst_color_blend_factor = BlendFactor::kZero; color0.src_alpha_blend_factor = BlendFactor::kOne;