22# Use of this source code is governed by a BSD-style license that can be
33# found in the LICENSE file.
44
5+ import (" //flutter/common/config.gni" )
6+ import (" //flutter/testing/testing.gni" )
57if (is_fuchsia ) {
68 import (" //build/fuchsia/sdk.gni" )
79 import (" //flutter/tools/fuchsia/fuchsia_archive.gni" )
810}
9- import (" //flutter/testing/testing.gni" )
1011
11- source_set (" flow" ) {
12+ source_set_maybe_fuchsia_legacy (" flow" ) {
1213 sources = [
1314 " compositor_context.cc" ,
1415 " compositor_context.h" ,
@@ -74,37 +75,33 @@ source_set("flow") {
7475
7576 public_configs = [ " //flutter:config" ]
7677
77- public_deps = []
78-
7978 deps = [
8079 " //flutter/common" ,
8180 " //flutter/fml" ,
8281 " //third_party/skia" ,
8382 ]
8483
85- if (is_fuchsia ) {
86- sources += [
87- " layers/child_scene_layer.cc" ,
88- " layers/child_scene_layer.h" ,
89- " scene_update_context.cc" ,
90- " scene_update_context.h" ,
91- " view_holder.cc" ,
92- " view_holder.h" ,
93- ]
84+ sources_legacy = [
85+ " layers/child_scene_layer.cc" ,
86+ " layers/child_scene_layer.h" ,
87+ " scene_update_context.cc" ,
88+ " scene_update_context.h" ,
89+ " view_holder.cc" ,
90+ " view_holder.h" ,
91+ ]
9492
95- public_deps += [
96- " $fuchsia_sdk_root /fidl:fuchsia.ui.app" ,
97- " $fuchsia_sdk_root /fidl:fuchsia.ui.gfx" ,
98- " $fuchsia_sdk_root /pkg:scenic_cpp" ,
99- ]
100- }
93+ deps_legacy = [
94+ " $fuchsia_sdk_root /fidl:fuchsia.ui.app" ,
95+ " $fuchsia_sdk_root /fidl:fuchsia.ui.gfx" ,
96+ " $fuchsia_sdk_root /pkg:scenic_cpp" ,
97+ ]
10198}
10299
103100test_fixtures (" flow_fixtures" ) {
104101 fixtures = []
105102}
106103
107- source_set (" flow_testing" ) {
104+ source_set_maybe_fuchsia_legacy (" flow_testing" ) {
108105 testonly = true
109106
110107 sources = [
@@ -113,20 +110,23 @@ source_set("flow_testing") {
113110 " testing/layer_test.h" ,
114111 " testing/mock_layer.cc" ,
115112 " testing/mock_layer.h" ,
113+ " testing/mock_raster_cache.cc" ,
114+ " testing/mock_raster_cache.h" ,
116115 " testing/mock_texture.cc" ,
117116 " testing/mock_texture.h" ,
118117 " testing/skia_gpu_object_layer_test.cc" ,
119118 " testing/skia_gpu_object_layer_test.h" ,
120119 ]
121120
122121 public_deps = [
123- " :flow" ,
124122 " //flutter/testing:skia" ,
125123 " //third_party/googletest:gtest" ,
126124 ]
125+
126+ deps_legacy_and_next = [ " :flow" ]
127127}
128128
129- executable ( " flow_unittests " ) {
129+ source_set_maybe_fuchsia_legacy ( " flow_unittests_srcs " ) {
130130 testonly = true
131131
132132 sources = [
@@ -160,10 +160,6 @@ executable("flow_unittests") {
160160 " texture_unittests.cc" ,
161161 ]
162162
163- if (is_fuchsia ) {
164- sources += [ " layers/fuchsia_layer_unittests.cc" ]
165- }
166-
167163 deps = [
168164 " :flow" ,
169165 " :flow_fixtures" ,
@@ -176,8 +172,35 @@ executable("flow_unittests") {
176172 " //third_party/skia" ,
177173 ]
178174
179- if (is_fuchsia ) {
180- deps += [ " //build/fuchsia/pkg:sys_cpp_testing" ]
175+ sources_legacy = [ " layers/fuchsia_layer_unittests.cc" ]
176+
177+ deps_legacy = [ " //build/fuchsia/pkg:sys_cpp_testing" ]
178+
179+ deps_legacy_and_next = [ " :flow" ]
180+ }
181+
182+ if (is_fuchsia ) {
183+ executable (" flow_unittests" ) {
184+ testonly = true
185+
186+ deps = [
187+ " :flow_unittests_srcs_fuchsia_legacy" ,
188+ ]
189+ }
190+ executable (" flow_unittests_next" ) {
191+ testonly = true
192+
193+ deps = [
194+ " :flow_unittests_srcs" ,
195+ ]
196+ }
197+ } else {
198+ executable (" flow_unittests" ) {
199+ testonly = true
200+
201+ deps = [
202+ " :flow_unittests_srcs" ,
203+ ]
181204 }
182205}
183206
0 commit comments