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