From 32f94f4ff458f9e2098db7a607c8316747ce61a7 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Mon, 13 Mar 2023 16:10:15 -0700 Subject: [PATCH] fix unittests that depend on DL when Impeller 3D is enabled (flutter/engine#40258) fix unittests that depend on DisplayList when Impeller 3D is enabled --- engine/src/flutter/display_list/BUILD.gn | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/display_list/BUILD.gn b/engine/src/flutter/display_list/BUILD.gn index 35e6c8f689..7af433a35d 100644 --- a/engine/src/flutter/display_list/BUILD.gn +++ b/engine/src/flutter/display_list/BUILD.gn @@ -7,6 +7,14 @@ import("//flutter/common/config.gni") import("//flutter/impeller/tools/impeller.gni") import("//flutter/testing/testing.gni") +config("display_list_config") { + defines = [] + + if (impeller_enable_3d) { + defines += [ "IMPELLER_ENABLE_3D" ] + } +} + source_set("display_list") { sources = [ "display_list.cc", @@ -65,6 +73,8 @@ source_set("display_list") { "types.h", ] + public_configs = [ ":display_list_config" ] + public_deps = [ "//flutter/fml", "//flutter/impeller/runtime_stage", @@ -74,10 +84,6 @@ source_set("display_list") { if (!defined(defines)) { defines = [] } - if (impeller_enable_3d) { - defines += [ "IMPELLER_ENABLE_3D" ] - public_deps += [ "//flutter/impeller/scene" ] - } } if (enable_unittests) {