From 540cb080cc40e895b5ccd9a7c531f6961d4147d0 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 5 Mar 2024 17:20:05 -0800 Subject: [PATCH] [Impeller] disable blending in gaussian intermediate steps. (flutter/engine#51118) Noticed this while working on the StC debugging. We can disable blending on all intermediate gaussian steps. I don't know how much of an impact this has in practice. --- .../entity/contents/filters/gaussian_blur_filter_contents.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index 46513f3b4b..35865e1607 100644 --- a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -12,9 +12,7 @@ #include "impeller/entity/contents/content_context.h" #include "impeller/entity/texture_fill.frag.h" #include "impeller/entity/texture_fill.vert.h" -#include "impeller/renderer/command.h" #include "impeller/renderer/render_pass.h" -#include "impeller/renderer/texture_mipmap.h" #include "impeller/renderer/vertex_buffer_builder.h" namespace impeller { @@ -89,6 +87,7 @@ fml::StatusOr MakeDownsampleSubpass( pass.SetCommandLabel("Gaussian blur downsample"); auto pipeline_options = OptionsFromPass(pass); pipeline_options.primitive_type = PrimitiveType::kTriangleStrip; + pipeline_options.blend_mode = BlendMode::kSource; pass.SetPipeline(renderer.GetTexturePipeline(pipeline_options)); TextureFillVertexShader::FrameInfo frame_info; @@ -150,6 +149,7 @@ fml::StatusOr MakeBlurSubpass( ContentContextOptions options = OptionsFromPass(pass); options.primitive_type = PrimitiveType::kTriangleStrip; + options.blend_mode = BlendMode::kSource; if (tile_mode == Entity::TileMode::kDecal && !renderer.GetDeviceCapabilities()