| 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 | 6 |
| 7 gl_binding_output_dir = target_gen_dir | 7 gl_binding_output_dir = target_gen_dir |
| 8 | 8 |
| 9 config("gl_config") { | 9 config("gl_config") { |
| 10 if (use_x11) { | 10 if (use_x11) { |
| 11 defines = [ "GL_GLEXT_PROTOTYPES" ] | 11 defines = [ "GL_GLEXT_PROTOTYPES" ] |
| 12 } | 12 } |
| 13 |
| 14 # TODO(brettw) this should be removed and the the files using the generated |
| 15 # GL bindings should use the path inside the gen directory. |
| 16 include_dirs = [ gl_binding_output_dir ] |
| 13 } | 17 } |
| 14 | 18 |
| 15 component("gl") { | 19 component("gl") { |
| 16 output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. | 20 output_name = "gl_wrapper" # Avoid colliding with OS X"s libGL.dylib. |
| 17 | 21 |
| 18 sources = [ | 22 sources = [ |
| 19 "android/gl_jni_registrar.cc", | 23 "android/gl_jni_registrar.cc", |
| 20 "android/gl_jni_registrar.h", | 24 "android/gl_jni_registrar.h", |
| 21 "android/scoped_java_surface.cc", | 25 "android/scoped_java_surface.cc", |
| 22 "android/scoped_java_surface.h", | 26 "android/scoped_java_surface.h", |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 ] | 236 ] |
| 233 } | 237 } |
| 234 | 238 |
| 235 # TODO(GYP) enable this dependency once its written. | 239 # TODO(GYP) enable this dependency once its written. |
| 236 #if (is_android && !android_webview_build) { | 240 #if (is_android && !android_webview_build) { |
| 237 # deps += [ "//ui/android:ui_java" ] | 241 # deps += [ "//ui/android:ui_java" ] |
| 238 #} | 242 #} |
| 239 } | 243 } |
| 240 | 244 |
| 241 action("generate_gl_bindings") { | 245 action("generate_gl_bindings") { |
| 246 visibility = ":*" # Only targets in this file can see this. |
| 247 |
| 242 script = "generate_bindings.py" | 248 script = "generate_bindings.py" |
| 243 | 249 |
| 244 # TODO(brettw) make this dynamic. The GYP version calls "generate_bindings.py | 250 # TODO(brettw) make this dynamic. The GYP version calls "generate_bindings.py |
| 245 # --inputs" to get the list here. What should happen is that the script | 251 # --inputs" to get the list here. What should happen is that the script |
| 246 # should generate a .d file, which we should declare here. That will | 252 # should generate a .d file, which we should declare here. That will |
| 247 # eliminate the need bot both hardcoding the list here or calling the script | 253 # eliminate the need bot both hardcoding the list here or calling the script |
| 248 # during GN-time. | 254 # during GN-time. |
| 249 source_prereqs = [ | 255 source_prereqs = [ |
| 250 "EGL/eglextchromium.h", | 256 "EGL/eglextchromium.h", |
| 251 "GL/glextchromium.h", | 257 "GL/glextchromium.h", |
| (...skipping 28 matching lines...) Expand all Loading... |
| 280 "$gl_binding_output_dir/gl_mock_autogen_gl.h", | 286 "$gl_binding_output_dir/gl_mock_autogen_gl.h", |
| 281 ] | 287 ] |
| 282 | 288 |
| 283 args = [ | 289 args = [ |
| 284 "--header-paths=" + | 290 "--header-paths=" + |
| 285 rebase_path("//third_party/khronos", root_build_dir) + ":" + | 291 rebase_path("//third_party/khronos", root_build_dir) + ":" + |
| 286 rebase_path("//third_party/mesa/src/include", root_build_dir), | 292 rebase_path("//third_party/mesa/src/include", root_build_dir), |
| 287 rebase_path(gl_binding_output_dir, root_build_dir), | 293 rebase_path(gl_binding_output_dir, root_build_dir), |
| 288 ] | 294 ] |
| 289 } | 295 } |
| OLD | NEW |