From ff91b522dd9c39efff2786361ad2f238a576f5a4 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 28 Mar 2022 12:31:38 -0700 Subject: [PATCH] Premultiply gradient colors (flutter/engine#106) --- .../impeller/entity/contents/linear_gradient_contents.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/impeller/entity/contents/linear_gradient_contents.cc b/engine/src/flutter/impeller/entity/contents/linear_gradient_contents.cc index 10a2c08f86..092eee4ff1 100644 --- a/engine/src/flutter/impeller/entity/contents/linear_gradient_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/linear_gradient_contents.cc @@ -61,8 +61,8 @@ bool LinearGradientContents::Render(const ContentContext& renderer, FS::GradientInfo gradient_info; gradient_info.start_point = start_point_; gradient_info.end_point = end_point_; - gradient_info.start_color = colors_[0]; - gradient_info.end_color = colors_[1]; + gradient_info.start_color = colors_[0].Premultiply(); + gradient_info.end_color = colors_[1].Premultiply(); Command cmd; cmd.label = "LinearGradientFill";