From bad97b052bf7712d87766d6246f4dcba02cfad80 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 31 Aug 2023 20:47:52 -0700 Subject: [PATCH] [Impeller] use correct blend mode for performance overlay (flutter/engine#45365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Man this is a sharp 🔪 I literally pointed this out in the review and failed to notice the wrong parameter had the blend mode. --- engine/src/flutter/flow/stopwatch_dl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/flow/stopwatch_dl.cc b/engine/src/flutter/flow/stopwatch_dl.cc index 20a49584606..1da2963ebff 100644 --- a/engine/src/flutter/flow/stopwatch_dl.cc +++ b/engine/src/flutter/flow/stopwatch_dl.cc @@ -101,7 +101,11 @@ void DlStopwatchVisualizer::Visualize(DlCanvas* canvas, } // Actually draw. - // Note we use kSrcOver, because some of the colors above have opacity < 1.0. + // Use kSrcOver blend mode so that elements under the performance overlay are + // partially visible. + paint.setBlendMode(DlBlendMode::kSrcOver); + // The second blend mode does nothing since the paint has no additional color + // sources like a tiled image or gradient. canvas->DrawVertices(painter.IntoVertices(), DlBlendMode::kSrcOver, paint); }