Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: ui/gfx/BUILD.gn

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/test/cocoa_test_event_utils.mm ('k') | ui/gfx/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/ui.gni") 5 import("//build/config/ui.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 if (is_android) { 8 if (is_android) {
9 import("//build/config/android/config.gni") 9 import("//build/config/android/config.gni")
10 import("//build/config/android/rules.gni") 10 import("//build/config/android/rules.gni")
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 deps = [ 89 deps = [
90 ":gfx_export", 90 ":gfx_export",
91 "//base/third_party/dynamic_annotations", 91 "//base/third_party/dynamic_annotations",
92 "//base:base_static", 92 "//base:base_static",
93 "//base:i18n", 93 "//base:i18n",
94 "//skia", 94 "//skia",
95 "//third_party/harfbuzz-ng", 95 "//third_party/harfbuzz-ng",
96 "//third_party/libpng", 96 "//third_party/libpng",
97 "//third_party/zlib", 97 "//third_party/zlib",
98 "//third_party:jpeg",
98 "//ui/gfx/geometry", 99 "//ui/gfx/geometry",
99 ] 100 ]
100 public_deps = [ 101 public_deps = [
101 "//base", 102 "//base",
102 "//skia", 103 "//skia",
103 "//third_party/icu", 104 "//third_party/icu",
104 ] 105 ]
105 106
106 # iOS.
107 if (is_ios) {
108 sources -= [
109 "codec/jpeg_codec.cc",
110 "codec/jpeg_codec.h",
111 ]
112 } else {
113 deps += [ "//third_party:jpeg" ]
114 }
115
116 # Android. 107 # Android.
117 if (is_android) { 108 if (is_android) {
118 sources -= [ 109 sources -= [
119 "animation/throb_animation.cc", 110 "animation/throb_animation.cc",
120 "display_observer.cc", 111 "display_observer.cc",
121 ] 112 ]
122 113
123 # TODO(GYP) re-enable when base_java exists. 114 # TODO(GYP) re-enable when base_java exists.
124 #if (!is_android_webview_build) { 115 #if (!is_android_webview_build) {
125 # deps += [ "//base:base_java" ] 116 # deps += [ "//base:base_java" ]
126 #} 117 #}
127 118
128 # TODO(jdduke): Revisit optimization after gauging benefit, crbug/419051. 119 # TODO(jdduke): Revisit optimization after gauging benefit, crbug/419051.
129 if (!is_debug) { 120 if (!is_debug) {
130 configs -= [ "//build/config/compiler:optimize" ] 121 configs -= [ "//build/config/compiler:optimize" ]
131 configs += [ "//build/config/compiler:optimize_max" ] 122 configs += [ "//build/config/compiler:optimize_max" ]
132 } 123 }
133 124
134 deps += [ ":gfx_jni_headers" ] 125 deps += [ ":gfx_jni_headers" ]
135 libs = [ 126 libs = [
136 "android", 127 "android",
137 "jnigraphics", 128 "jnigraphics",
138 ] 129 ]
139 } 130 }
140 131
141 # Windows.
142 if (is_win) {
143 cflags = [
144 "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int.
145 "/wd4324", # Structure was padded due to __declspec(align()), which is
146 # uninteresting.
147 ]
148 }
149
150 # Linux. 132 # Linux.
151 if (is_linux) { 133 if (is_linux) {
152 configs += [ "//build/config/linux:fontconfig" ] 134 configs += [ "//build/config/linux:fontconfig" ]
153 } 135 }
154 136
155 if (use_x11) { 137 if (use_x11) {
156 deps += [ "//ui/gfx/x" ] 138 deps += [ "//ui/gfx/x" ]
157 } 139 }
158 } 140 }
159 141
160 # Looking for gfx_geometry? It's //ui/gfx/geometry:geometry 142 # Looking for gfx_geometry? It's //ui/gfx/geometry:geometry
161 143
162 source_set("test_support") { 144 source_set("test_support") {
163 testonly = true 145 testonly = true
164 sources = [ 146 sources = [
165 "test/fontconfig_util_linux.cc", 147 "test/fontconfig_util_linux.cc",
166 "test/fontconfig_util_linux.h", 148 "test/fontconfig_util_linux.h",
167 "test/gfx_util.cc", 149 "test/gfx_util.cc",
168 "test/gfx_util.h", 150 "test/gfx_util.h",
169 "test/ui_cocoa_test_helper.h",
170 "test/ui_cocoa_test_helper.mm",
171 ] 151 ]
172 152
173 public_deps = [ 153 public_deps = [
174 ":gfx", 154 ":gfx",
175 ] 155 ]
176 156
177 deps = [ 157 deps = [
178 "//base", 158 "//base",
179 "//base/test:test_support", 159 "//base/test:test_support",
180 "//skia", 160 "//skia",
181 "//testing/gtest", 161 "//testing/gtest",
182 "//ui/gfx/geometry", 162 "//ui/gfx/geometry",
183 ] 163 ]
184 164
185 if (is_ios) {
186 # The cocoa files don't apply to iOS.
187 sources -= [
188 "test/ui_cocoa_test_helper.h",
189 "test/ui_cocoa_test_helper.mm",
190 ]
191 }
192 if (is_linux) { 165 if (is_linux) {
193 configs += [ "//build/config/linux:fontconfig" ] 166 configs += [ "//build/config/linux:fontconfig" ]
194 } 167 }
195 } 168 }
196 169
197 test("gfx_unittests") { 170 test("gfx_unittests") {
198 sources = [ 171 sources = [
172 "animation/animation_container_unittest.cc",
173 "animation/animation_unittest.cc",
174 "animation/multi_animation_unittest.cc",
175 "animation/slide_animation_unittest.cc",
176 "animation/tween_unittest.cc",
177 "codec/jpeg_codec_unittest.cc",
178 "codec/png_codec_unittest.cc",
179 "display_change_notifier_unittest.cc",
180 "display_unittest.cc",
181 "geometry/box_unittest.cc",
182 "geometry/cubic_bezier_unittest.cc",
183 "geometry/insets_unittest.cc",
184 "geometry/matrix3_unittest.cc",
185 "geometry/point3_unittest.cc",
186 "geometry/point_unittest.cc",
187 "geometry/quad_unittest.cc",
188 "geometry/r_tree_unittest.cc",
189 "geometry/rect_unittest.cc",
190 "geometry/safe_integer_conversions_unittest.cc",
191 "geometry/scroll_offset_unittest.cc",
192 "geometry/size_unittest.cc",
193 "geometry/vector2d_unittest.cc",
194 "geometry/vector3d_unittest.cc",
195 "sequential_id_generator_unittest.cc",
196 "skrect_conversion_unittest.cc",
199 "test/run_all_unittests.cc", 197 "test/run_all_unittests.cc",
198 "transform_unittest.cc",
199 "transform_util_unittest.cc",
200 ] 200 ]
201 201
202 if (!is_ios) {
203 sources += [
204 "animation/animation_container_unittest.cc",
205 "animation/animation_unittest.cc",
206 "animation/multi_animation_unittest.cc",
207 "animation/slide_animation_unittest.cc",
208 "animation/tween_unittest.cc",
209 "codec/jpeg_codec_unittest.cc",
210 "codec/png_codec_unittest.cc",
211 "display_change_notifier_unittest.cc",
212 "display_unittest.cc",
213 "geometry/box_unittest.cc",
214 "geometry/cubic_bezier_unittest.cc",
215 "geometry/insets_unittest.cc",
216 "geometry/matrix3_unittest.cc",
217 "geometry/point3_unittest.cc",
218 "geometry/point_unittest.cc",
219 "geometry/quad_unittest.cc",
220 "geometry/r_tree_unittest.cc",
221 "geometry/rect_unittest.cc",
222 "geometry/safe_integer_conversions_unittest.cc",
223 "geometry/scroll_offset_unittest.cc",
224 "geometry/size_unittest.cc",
225 "geometry/vector2d_unittest.cc",
226 "geometry/vector3d_unittest.cc",
227 "sequential_id_generator_unittest.cc",
228 "skrect_conversion_unittest.cc",
229 "transform_util_unittest.cc",
230 ]
231 }
232
233 deps = [ 202 deps = [
234 ":gfx", 203 ":gfx",
235 ":test_support", 204 ":test_support",
236 "//base", 205 "//base",
237 "//base/test:test_support", 206 "//base/test:test_support",
238 "//skia", 207 "//skia",
239 "//third_party/icu:icuuc", 208 "//third_party/icu:icuuc",
240 "//third_party/libpng", 209 "//third_party/libpng",
241 "//third_party/zlib", 210 "//third_party/zlib",
242 "//testing/gtest", 211 "//testing/gtest",
243 "//ui/base", 212 "//ui/base",
244 "//ui/gfx/geometry", 213 "//ui/gfx/geometry",
245 ] 214 ]
246 215
247 if (!is_mac && !is_ios) {
248 sources += [ "transform_unittest.cc" ]
249 }
250
251 if (is_android) { 216 if (is_android) {
252 sources -= [ 217 sources -= [
253 # Do not run display_change_notifier_unittest.cc on Android because it 218 # Do not run display_change_notifier_unittest.cc on Android because it
254 # does not compile display_observer.cc 219 # does not compile display_observer.cc
255 "display_change_notifier_unittest.cc", 220 "display_change_notifier_unittest.cc",
256 ] 221 ]
257 222
258 deps += [ 223 deps += [
259 #'../../testing/android/native_test.gyp:native_test_native_code', TODO(GYP ) 224 #'../../testing/android/native_test.gyp:native_test_native_code', TODO(GYP )
260 ] 225 ]
261 } 226 }
262
263 if (is_win) {
264 sources += [ "font_fallback_win_unittest.cc" ]
265
266 ldflags = [
267 "/DELAYLOAD:d2d1.dll",
268 "/DELAYLOAD:d3d10_1.dll",
269 ]
270
271 libs = [
272 "d2d1.lib",
273 "d3d10_1.lib",
274 "imm32.lib",
275 "oleacc.lib",
276 ]
277
278 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
279 cflags = [ "/wd4267" ]
280 }
281 } 227 }
282 228
283 if (is_android) { 229 if (is_android) {
284 generate_jni("gfx_jni_headers") { 230 generate_jni("gfx_jni_headers") {
285 sources = [ 231 sources = [
286 "../android/java/src/org/chromium/ui/gfx/BitmapHelper.java", 232 "../android/java/src/org/chromium/ui/gfx/BitmapHelper.java",
287 "../android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java", 233 "../android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java",
288 "../android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java", 234 "../android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java",
289 ] 235 ]
290 jni_package = "gfx" 236 jni_package = "gfx"
291 } 237 }
292 } 238 }
OLDNEW
« no previous file with comments | « ui/events/test/cocoa_test_event_utils.mm ('k') | ui/gfx/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698