OLD | NEW |
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 configs += [ "//third_party/khronos:khronos_headers" ] | 279 configs += [ "//third_party/khronos:khronos_headers" ] |
280 | 280 |
281 deps = [ | 281 deps = [ |
282 ":gl", | 282 ":gl", |
283 "//testing/gmock", | 283 "//testing/gmock", |
284 ] | 284 ] |
285 } | 285 } |
286 | 286 |
287 source_set("test_support") { | 287 source_set("test_support") { |
288 testonly = true | |
289 sources = [ | 288 sources = [ |
290 "test/gl_image_test_support.cc", | |
291 "test/gl_image_test_support.h", | |
292 "test/gl_image_test_template.h", | |
293 "test/gl_surface_test_support.cc", | 289 "test/gl_surface_test_support.cc", |
294 "test/gl_surface_test_support.h", | 290 "test/gl_surface_test_support.h", |
295 "test/gl_test_helper.cc", | |
296 "test/gl_test_helper.h", | |
297 ] | 291 ] |
298 | 292 |
299 configs += [ "//third_party/khronos:khronos_headers" ] | 293 configs += [ "//third_party/khronos:khronos_headers" ] |
300 | 294 |
301 deps = [ | 295 deps = [ |
302 "//testing/gtest", | |
303 ":gl", | 296 ":gl", |
304 ] | 297 ] |
305 | 298 |
306 if (use_x11) { | 299 if (use_x11) { |
307 configs += [ "//build/config/linux:x11" ] | 300 configs += [ "//build/config/linux:x11" ] |
308 deps += [ | 301 deps += [ |
309 "//ui/gfx/x", | 302 "//ui/gfx/x", |
310 "//ui/platform_window/x11", | 303 "//ui/platform_window/x11", |
311 ] | 304 ] |
312 } | 305 } |
313 } | 306 } |
314 | 307 |
315 # TODO(GYP): Delete this after we've converted everything to GN. | 308 # TODO(GYP): Delete this after we've converted everything to GN. |
316 # The _run targets exist only for compatibility w/ GYP. | 309 # The _run targets exist only for compatibility w/ GYP. |
317 group("gl_unittests_run") { | 310 group("gl_unittests_run") { |
318 testonly = true | 311 testonly = true |
319 deps = [ | 312 deps = [ |
320 ":gl_unittests", | 313 ":gl_unittests", |
321 ] | 314 ] |
322 } | 315 } |
323 | 316 |
324 test("gl_unittests") { | 317 test("gl_unittests") { |
325 sources = [ | 318 sources = [ |
326 "gl_api_unittest.cc", | 319 "gl_api_unittest.cc", |
327 "gl_image_ref_counted_memory_unittest.cc", | |
328 "gl_image_shared_memory_unittest.cc", | |
329 "gpu_timing_unittest.cc", | 320 "gpu_timing_unittest.cc", |
330 "test/run_all_unittests.cc", | 321 "test/run_all_unittests.cc", |
331 ] | 322 ] |
332 | 323 |
333 if (is_win || is_android || is_linux) { | 324 if (is_win || is_android || is_linux) { |
334 sources += [ | 325 sources += [ |
335 "egl_api_unittest.cc", | 326 "egl_api_unittest.cc", |
336 "test/egl_initialization_displays_unittest.cc", | 327 "test/egl_initialization_displays_unittest.cc", |
337 ] | 328 ] |
338 } | 329 } |
339 | 330 |
340 if (use_x11) { | 331 if (use_x11) { |
341 sources += [ "glx_api_unittest.cc" ] | 332 sources += [ "glx_api_unittest.cc" ] |
342 } | 333 } |
343 | 334 |
344 include_dirs = [ "//third_party/khronos" ] | 335 include_dirs = [ "//third_party/khronos" ] |
345 | 336 |
346 deps = [ | 337 deps = [ |
347 ":gl", | 338 ":gl", |
348 ":gl_unittest_utils", | 339 ":gl_unittest_utils", |
349 ":test_support", | 340 ":test_support", |
350 "//base", | 341 "//base", |
351 "//base/test:test_support", | 342 "//base/test:test_support", |
352 "//skia", | |
353 "//testing/gmock", | 343 "//testing/gmock", |
354 "//testing/gtest", | 344 "//testing/gtest", |
355 "//ui/gfx", | |
356 ] | 345 ] |
357 } | 346 } |
358 | 347 |
359 if (is_android) { | 348 if (is_android) { |
360 generate_jar_jni("surface_jni_headers") { | 349 generate_jar_jni("surface_jni_headers") { |
361 jni_package = "ui/gl" | 350 jni_package = "ui/gl" |
362 classes = [ "android/view/Surface.class" ] | 351 classes = [ "android/view/Surface.class" ] |
363 } | 352 } |
364 | 353 |
365 generate_jni("gl_jni_headers") { | 354 generate_jni("gl_jni_headers") { |
366 sources = [ | 355 sources = [ |
367 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", | 356 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", |
368 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", | 357 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", |
369 ] | 358 ] |
370 public_deps = [ | 359 public_deps = [ |
371 ":surface_jni_headers", | 360 ":surface_jni_headers", |
372 ] | 361 ] |
373 jni_package = "ui/gl" | 362 jni_package = "ui/gl" |
374 } | 363 } |
375 } | 364 } |
OLD | NEW |