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 if (is_android) { | 6 if (is_android) { |
7 import("//build/config/android/config.gni") | 7 import("//build/config/android/config.gni") |
8 import("//build/config/android/rules.gni") | 8 import("//build/config/android/rules.gni") |
9 } | 9 } |
10 | 10 |
11 gl_binding_output_dir = target_gen_dir | 11 gl_binding_output_dir = target_gen_dir |
12 | 12 |
13 config("gl_config") { | 13 config("gl_config") { |
14 if (use_x11) { | 14 if (use_x11) { |
15 defines = [ "GL_GLEXT_PROTOTYPES" ] | 15 defines = [ "GL_GLEXT_PROTOTYPES" ] |
16 } | 16 } |
17 | 17 |
18 # TODO(brettw) this should be removed and the the files using the generated | 18 # TODO(brettw) this should be removed and the the files using the generated |
19 # GL bindings should use the path inside the gen directory. | 19 # GL bindings should use the path inside the gen directory. |
20 include_dirs = [ gl_binding_output_dir ] | 20 include_dirs = [ gl_binding_output_dir ] |
21 } | 21 } |
22 | 22 |
23 # Dependents of this component must separatedly add | |
24 # "//third_party/mesa/src/include" to include_dirs. Although this can be done | |
25 # through all_dependent_configs, that does not ensure that this directory will | |
26 # be before Windows SDK include directory. But we must guarantee that, in other | |
27 # case we will pick gl.h header from SDK rather from mesa, | |
28 # and compilation will fail. | |
Slava Chigrin
2014/12/16 17:53:49
Unfortunatelly, I can not find any more elegant so
no sievers
2014/12/16 19:38:46
hmm yea gyp has something to inject dependencies f
Slava Chigrin
2014/12/16 22:32:38
Sorry, let me explain problem, arising here, in mo
| |
23 component("gl") { | 29 component("gl") { |
24 output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. | 30 output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. |
25 | 31 |
26 sources = [ | 32 sources = [ |
27 "android/gl_jni_registrar.cc", | 33 "android/gl_jni_registrar.cc", |
28 "android/gl_jni_registrar.h", | 34 "android/gl_jni_registrar.h", |
29 "android/scoped_java_surface.cc", | 35 "android/scoped_java_surface.cc", |
30 "android/scoped_java_surface.h", | 36 "android/scoped_java_surface.h", |
31 "android/surface_texture.cc", | 37 "android/surface_texture.cc", |
32 "android/surface_texture.h", | 38 "android/surface_texture.h", |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 source_set("gl_unittest_utils") { | 317 source_set("gl_unittest_utils") { |
312 testonly = true | 318 testonly = true |
313 sources = [ | 319 sources = [ |
314 "gl_mock.h", | 320 "gl_mock.h", |
315 "gl_mock.cc", | 321 "gl_mock.cc", |
316 "$gl_binding_output_dir/gl_bindings_autogen_mock.cc", | 322 "$gl_binding_output_dir/gl_bindings_autogen_mock.cc", |
317 "$gl_binding_output_dir/gl_bindings_autogen_mock.h", | 323 "$gl_binding_output_dir/gl_bindings_autogen_mock.h", |
318 "$gl_binding_output_dir/gl_mock_autogen_gl.h", | 324 "$gl_binding_output_dir/gl_mock_autogen_gl.h", |
319 ] | 325 ] |
320 | 326 |
327 # See commend before :gl target. | |
328 include_dirs = [ "//third_party/mesa/src/include" ] | |
no sievers
2014/12/16 19:38:46
why do we need this? we usually prefer khronos hea
Slava Chigrin
2014/12/16 22:32:38
OK, will change include path, if khronos have gl.h
| |
321 configs += [ "//third_party/khronos:khronos_headers" ] | 329 configs += [ "//third_party/khronos:khronos_headers" ] |
322 public_configs = [ ":gl_unittest_utils_config" ] | 330 public_configs = [ ":gl_unittest_utils_config" ] |
323 | 331 |
324 deps = [ | 332 deps = [ |
325 ":gl", | 333 ":gl", |
326 "//testing/gmock", | 334 "//testing/gmock", |
327 ] | 335 ] |
328 } | 336 } |
329 | 337 |
330 if (is_android) { | 338 if (is_android) { |
331 generate_jar_jni("surface_jni_headers") { | 339 generate_jar_jni("surface_jni_headers") { |
332 jni_package = "ui/gl" | 340 jni_package = "ui/gl" |
333 classes = [ "android/view/Surface.class" ] | 341 classes = [ "android/view/Surface.class" ] |
334 } | 342 } |
335 | 343 |
336 generate_jni("gl_jni_headers") { | 344 generate_jni("gl_jni_headers") { |
337 deps = [ | 345 deps = [ |
338 ":surface_jni_headers", | 346 ":surface_jni_headers", |
339 ] | 347 ] |
340 sources = [ | 348 sources = [ |
341 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", | 349 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", |
342 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java ", | 350 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java ", |
343 ] | 351 ] |
344 jni_package = "ui/gl" | 352 jni_package = "ui/gl" |
345 } | 353 } |
346 } | 354 } |
OLD | NEW |