From c0e6c19e09740f90a62a8266676afee55d152eaf Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Mon, 18 Nov 2024 21:28:26 -0500 Subject: [PATCH] Remove SK_USE_LEGACY_BLUR_RASTER staging flag (flutter/engine#56618) Also updates the image_filter_test.dart expected color values for a blur unit test. The legacy blur algorithm would a) treat very small blur sigmas as the identity even though the effect was still perceptible and b) was very inaccurate for sigmas < 2. The unit test used a sigma of 1.0 so fell within the inaccurate range but the expected values appear to have been taken directly from the original Skia output. This updates them to match the output of the new algorithm (which is also more consistent between CPU and GPU). [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/skia/flutter_defines.gni | 1 - engine/src/flutter/testing/dart/image_filter_test.dart | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/skia/flutter_defines.gni b/engine/src/flutter/skia/flutter_defines.gni index 0b40a0f7c0e..83e6433ab80 100644 --- a/engine/src/flutter/skia/flutter_defines.gni +++ b/engine/src/flutter/skia/flutter_defines.gni @@ -13,7 +13,6 @@ flutter_defines = [ "SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER", "SK_DISABLE_LEGACY_METAL_BACKEND_SURFACE", "SK_DISABLE_LEGACY_PARAGRAPH_UNICODE", - "SK_USE_LEGACY_BLUR_RASTER", # Fast low-precision software rendering isn't a priority for Flutter. "SK_DISABLE_LEGACY_SHADERCONTEXT", diff --git a/engine/src/flutter/testing/dart/image_filter_test.dart b/engine/src/flutter/testing/dart/image_filter_test.dart index 5818038f465..65e555fcb70 100644 --- a/engine/src/flutter/testing/dart/image_filter_test.dart +++ b/engine/src/flutter/testing/dart/image_filter_test.dart @@ -14,9 +14,9 @@ import 'impeller_enabled.dart'; const Color red = Color(0xFFAA0000); const Color green = Color(0xFF00AA00); -const int greenCenterBlurred = 0x1C001300; -const int greenSideBlurred = 0x15000E00; -const int greenCornerBlurred = 0x10000A00; +const int greenCenterBlurred = 0x29001B00; +const int greenSideBlurred = 0x19001000; +const int greenCornerBlurred = 0x0F000A00; const int greenCenterScaled = 0xFF00AA00; const int greenSideScaled = 0x80005500;