| 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") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/linux/pkg_config.gni") | 7 import("//build/config/linux/pkg_config.gni") |
| 8 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
| 9 import("//ui/ozone/ozone.gni") | 9 import("//ui/ozone/ozone.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| 11 | 11 |
| 12 declare_args() { | 12 declare_args() { |
| 13 enable_swiftshader = is_chrome_branded && is_win | 13 enable_swiftshader = is_chrome_branded && is_win |
| 14 } | 14 } |
| 15 | 15 |
| 16 use_egl = is_win || is_android || is_linux | 16 use_egl = is_win || is_android || is_linux |
| 17 build_x11_gl = use_x11 || ozone_platform_x11 | 17 use_glx = use_x11 || ozone_platform_x11 |
| 18 | 18 |
| 19 if (is_android) { | 19 if (is_android) { |
| 20 import("//build/config/android/config.gni") | 20 import("//build/config/android/config.gni") |
| 21 import("//build/config/android/rules.gni") | 21 import("//build/config/android/rules.gni") |
| 22 } | 22 } |
| 23 | 23 |
| 24 buildflag_header("gl_features") { | 24 buildflag_header("gl_features") { |
| 25 header = "gl_features.h" | 25 header = "gl_features.h" |
| 26 flags = [ "ENABLE_SWIFTSHADER=$enable_swiftshader" ] | 26 flags = [ "ENABLE_SWIFTSHADER=$enable_swiftshader" ] |
| 27 } | 27 } |
| 28 | 28 |
| 29 config("gl_config") { | 29 config("gl_config") { |
| 30 defines = [] | 30 defines = [] |
| 31 if (build_x11_gl) { | 31 if (use_glx) { |
| 32 defines += [ | 32 defines += [ |
| 33 "GL_GLEXT_PROTOTYPES", | 33 "GL_GLEXT_PROTOTYPES", |
| 34 "USE_GLX", | 34 "USE_GLX", |
| 35 ] | 35 ] |
| 36 } | 36 } |
| 37 if (use_egl) { | 37 if (use_egl) { |
| 38 defines += [ "USE_EGL" ] | 38 defines += [ "USE_EGL" ] |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 "gl_implementation_osmesa.cc", | 182 "gl_implementation_osmesa.cc", |
| 183 "gl_implementation_osmesa.h", | 183 "gl_implementation_osmesa.h", |
| 184 ] | 184 ] |
| 185 } | 185 } |
| 186 if (use_x11) { | 186 if (use_x11) { |
| 187 sources += [ | 187 sources += [ |
| 188 "gl_surface_egl_x11.cc", | 188 "gl_surface_egl_x11.cc", |
| 189 "gl_surface_egl_x11.h", | 189 "gl_surface_egl_x11.h", |
| 190 "gl_surface_glx_x11.cc", | 190 "gl_surface_glx_x11.cc", |
| 191 "gl_surface_glx_x11.h", | 191 "gl_surface_glx_x11.h", |
| 192 "gl_surface_osmesa_x11.cc", |
| 193 "gl_surface_osmesa_x11.h", |
| 192 ] | 194 ] |
| 193 | 195 |
| 194 deps += [ "//ui/base/x" ] | 196 deps += [ "//ui/base/x" ] |
| 195 | 197 |
| 196 data_deps = [ | 198 data_deps = [ |
| 197 "//third_party/angle:libEGL", | 199 "//third_party/angle:libEGL", |
| 198 "//third_party/angle:libGLESv2", | 200 "//third_party/angle:libGLESv2", |
| 199 ] | 201 ] |
| 200 } | 202 } |
| 201 if (build_x11_gl) { | 203 if (use_glx) { |
| 202 sources += [ | 204 sources += [ |
| 203 "gl_bindings_autogen_glx.cc", | 205 "gl_bindings_autogen_glx.cc", |
| 204 "gl_bindings_autogen_glx.h", | 206 "gl_bindings_autogen_glx.h", |
| 205 "gl_context_glx.cc", | 207 "gl_context_glx.cc", |
| 206 "gl_context_glx.h", | 208 "gl_context_glx.h", |
| 207 "gl_glx_api_implementation.cc", | 209 "gl_glx_api_implementation.cc", |
| 208 "gl_glx_api_implementation.h", | 210 "gl_glx_api_implementation.h", |
| 209 "gl_image_glx.cc", | 211 "gl_image_glx.cc", |
| 210 "gl_image_glx.h", | 212 "gl_image_glx.h", |
| 211 "gl_surface_glx.cc", | 213 "gl_surface_glx.cc", |
| 212 "gl_surface_glx.h", | 214 "gl_surface_glx.h", |
| 213 "gl_surface_osmesa_x11.cc", | |
| 214 "gl_surface_osmesa_x11.h", | |
| 215 "gl_visual_picker_glx.cc", | 215 "gl_visual_picker_glx.cc", |
| 216 "gl_visual_picker_glx.h", | 216 "gl_visual_picker_glx.h", |
| 217 ] | 217 ] |
| 218 | 218 |
| 219 configs += [ | 219 configs += [ |
| 220 "//build/config/linux:x11", | 220 "//build/config/linux:x11", |
| 221 "//build/config/linux:xcomposite", | 221 "//build/config/linux:xcomposite", |
| 222 "//build/config/linux:xext", | 222 "//build/config/linux:xext", |
| 223 ] | 223 ] |
| 224 | 224 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 "gpu_timing_unittest.cc", | 376 "gpu_timing_unittest.cc", |
| 377 ] | 377 ] |
| 378 | 378 |
| 379 if (use_egl) { | 379 if (use_egl) { |
| 380 sources += [ | 380 sources += [ |
| 381 "egl_api_unittest.cc", | 381 "egl_api_unittest.cc", |
| 382 "test/egl_initialization_displays_unittest.cc", | 382 "test/egl_initialization_displays_unittest.cc", |
| 383 ] | 383 ] |
| 384 } | 384 } |
| 385 | 385 |
| 386 if (build_x11_gl) { | 386 if (use_glx) { |
| 387 sources += [ "glx_api_unittest.cc" ] | 387 sources += [ "glx_api_unittest.cc" ] |
| 388 } | 388 } |
| 389 | 389 |
| 390 if (is_mac) { | 390 if (is_mac) { |
| 391 sources += [ "gl_image_io_surface_unittest.cc" ] | 391 sources += [ "gl_image_io_surface_unittest.cc" ] |
| 392 libs = [ "IOSurface.framework" ] | 392 libs = [ "IOSurface.framework" ] |
| 393 } | 393 } |
| 394 | 394 |
| 395 if (is_win) { | 395 if (is_win) { |
| 396 sources += [ "wgl_api_unittest.cc" ] | 396 sources += [ "wgl_api_unittest.cc" ] |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 sources = [ | 443 sources = [ |
| 444 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", | 444 "../android/java/src/org/chromium/ui/gl/SurfaceTextureListener.java", |
| 445 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", | 445 "../android/java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java
", |
| 446 ] | 446 ] |
| 447 public_deps = [ | 447 public_deps = [ |
| 448 ":surface_jni_headers", | 448 ":surface_jni_headers", |
| 449 ] | 449 ] |
| 450 jni_package = "ui/gl" | 450 jni_package = "ui/gl" |
| 451 } | 451 } |
| 452 } | 452 } |
| OLD | NEW |