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/buildflag_header.gni") |
| 6 import("//build/config/chrome_build.gni") |
5 import("//build/config/linux/pkg_config.gni") | 7 import("//build/config/linux/pkg_config.gni") |
6 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
7 import("//testing/test.gni") | 9 import("//testing/test.gni") |
8 | 10 |
| 11 declare_args() { |
| 12 enable_swiftshader = false |
| 13 } |
| 14 |
9 use_egl = is_win || is_android || is_linux | 15 use_egl = is_win || is_android || is_linux |
10 use_glx = use_x11 | 16 use_glx = use_x11 |
11 | 17 |
12 if (is_android) { | 18 if (is_android) { |
13 import("//build/config/android/config.gni") | 19 import("//build/config/android/config.gni") |
14 import("//build/config/android/rules.gni") | 20 import("//build/config/android/rules.gni") |
15 } | 21 } |
16 | 22 |
| 23 buildflag_header("gl_features") { |
| 24 header = "gl_features.h" |
| 25 flags = [ "ENABLE_SWIFTSHADER=$enable_swiftshader" ] |
| 26 } |
| 27 |
17 config("gl_config") { | 28 config("gl_config") { |
18 defines = [] | 29 defines = [] |
19 if (use_glx) { | 30 if (use_glx) { |
20 defines += [ | 31 defines += [ |
21 "GL_GLEXT_PROTOTYPES", | 32 "GL_GLEXT_PROTOTYPES", |
22 "USE_GLX", | 33 "USE_GLX", |
23 ] | 34 ] |
24 } | 35 } |
25 if (use_egl) { | 36 if (use_egl) { |
26 defines += [ "USE_EGL" ] | 37 defines += [ "USE_EGL" ] |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 sources = [ | 407 sources = [ |
397 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", | 408 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", |
398 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", | 409 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", |
399 ] | 410 ] |
400 public_deps = [ | 411 public_deps = [ |
401 ":surface_jni_headers", | 412 ":surface_jni_headers", |
402 ] | 413 ] |
403 jni_package = "ui/gl" | 414 jni_package = "ui/gl" |
404 } | 415 } |
405 } | 416 } |
OLD | NEW |