forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.gn
169 lines (148 loc) · 4.21 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/testing/testing.gni")
source_set("display_list") {
sources = [
"display_list.cc",
"display_list.h",
"display_list_attributes.h",
"display_list_builder.cc",
"display_list_builder.h",
"display_list_canvas_dispatcher.cc",
"display_list_canvas_dispatcher.h",
"display_list_canvas_recorder.cc",
"display_list_canvas_recorder.h",
"display_list_color_filter.cc",
"display_list_color_filter.h",
"display_list_color_source.cc",
"display_list_color_source.h",
"display_list_complexity.cc",
"display_list_complexity.h",
"display_list_complexity_gl.cc",
"display_list_complexity_gl.h",
"display_list_complexity_metal.cc",
"display_list_complexity_metal.h",
"display_list_dispatcher.cc",
"display_list_dispatcher.h",
"display_list_flags.cc",
"display_list_flags.h",
"display_list_mask_filter.cc",
"display_list_mask_filter.h",
"display_list_ops.cc",
"display_list_ops.h",
"display_list_tile_mode.h",
"display_list_utils.cc",
"display_list_utils.h",
"types.h",
]
public_deps = [
"//flutter/fml",
"//third_party/skia",
]
}
# Instead of creating a new test harness for display lists, the flow_unittests
# harness includes these in its own.
source_set("unittests") {
testonly = true
sources = [
"display_list_attributes_testing.h",
"display_list_canvas_unittests.cc",
"display_list_color_filter_unittests.cc",
"display_list_color_source_unittests.cc",
"display_list_complexity_unittests.cc",
"display_list_enum_unittests.cc",
"display_list_mask_filter_unittests.cc",
"display_list_test_utils.cc",
"display_list_test_utils.h",
"display_list_unittests.cc",
]
deps = [
"//flutter/testing:testing_lib",
"//third_party/skia",
]
public_deps = [ ":display_list" ]
}
fixtures_location("display_list_benchmarks_fixtures") {
assets_dir = "$target_gen_dir/"
}
source_set("display_list_benchmarks_source") {
testonly = true
sources = [
"display_list_benchmarks.cc",
"display_list_benchmarks.h",
]
deps = [
":display_list",
":display_list_benchmarks_fixtures",
"//flutter/benchmarking",
"//flutter/common/graphics",
"//flutter/fml",
"//flutter/testing:skia",
"//flutter/testing:testing_lib",
"//third_party/dart/runtime:libdart_jit", # for tracing
"//third_party/skia",
]
defines = []
if (is_android) {
libs = [
"android",
"EGL",
"GLESv2",
]
}
# We only do software benchmarks on non-mobile platforms
if (!is_android && !is_ios) {
sources += [
"display_list_benchmarks_software.cc",
"display_list_benchmarks_software.h",
]
defines += [ "ENABLE_SOFTWARE_BENCHMARKS" ]
}
# iOS and Fuchsia don't support OpenGL
if (!is_fuchsia && !is_ios) {
defines += [ "ENABLE_OPENGL_BENCHMARKS" ]
sources += [
"display_list_benchmarks_gl.cc",
"display_list_benchmarks_gl.h",
]
deps += [ "//flutter/testing:opengl" ]
}
if (is_mac || is_ios) {
defines += [ "ENABLE_METAL_BENCHMARKS" ]
sources += [
"display_list_benchmarks_metal.cc",
"display_list_benchmarks_metal.h",
]
deps += [ "//flutter/testing:metal" ]
}
# Don't snapshot test results on mobile platforms
if (is_android || is_ios) {
defines += [ "BENCHMARKS_NO_SNAPSHOT" ]
}
}
executable("display_list_benchmarks") {
testonly = true
deps = [ ":display_list_benchmarks_source" ]
}
if (is_ios) {
shared_library("ios_display_list_benchmarks") {
testonly = true
visibility = [ ":*" ]
configs -= [
"//build/config/gcc:symbol_visibility_hidden",
"//build/config:symbol_visibility_hidden",
]
configs += [ "//flutter/benchmarking:benchmark_library_config" ]
cflags = [
"-fobjc-arc",
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
ldflags =
[ "-Wl,-install_name,@rpath/libios_display_list_benchmarks.dylib" ]
deps = [
":display_list_benchmarks_source",
"//flutter/benchmarking:benchmarking_library",
]
}
}