| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 component("init") { | 7 component("init") { |
| 8 output_name = "gl_init" | 8 output_name = "gl_init" |
| 9 | 9 |
| 10 public = [ | 10 public = [ |
| 11 "gl_factory.h", | 11 "gl_factory.h", |
| 12 ] | 12 ] |
| 13 | 13 |
| 14 sources = [ | 14 sources = [ |
| 15 "gl_factory.cc", | 15 "gl_factory.cc", |
| 16 "gl_init_export.h", | 16 "gl_init_export.h", |
| 17 "gl_initializer.h", | 17 "gl_initializer.h", |
| 18 ] | 18 ] |
| 19 defines = [ "GL_INIT_IMPLEMENTATION" ] | 19 defines = [ "GL_INIT_IMPLEMENTATION" ] |
| 20 | 20 |
| 21 include_dirs = [ "//third_party/swiftshader/include" ] | |
| 22 | |
| 23 deps = [ | 21 deps = [ |
| 24 "//base", | 22 "//base", |
| 25 "//ui/gfx", | 23 "//ui/gfx", |
| 26 ] | 24 ] |
| 27 | 25 |
| 28 public_deps = [ | 26 public_deps = [ |
| 29 "//ui/gl", | 27 "//ui/gl", |
| 30 ] | 28 ] |
| 31 | 29 |
| 32 if (is_android) { | 30 if (is_android) { |
| 33 sources += [ | 31 sources += [ |
| 34 "gl_factory_android.cc", | 32 "gl_factory_android.cc", |
| 35 "gl_initializer_android.cc", | 33 "gl_initializer_android.cc", |
| 36 ] | 34 ] |
| 37 } else if (is_win) { | 35 } else if (is_win) { |
| 38 sources += [ | 36 sources += [ |
| 39 "gl_factory_win.cc", | 37 "gl_factory_win.cc", |
| 40 "gl_initializer_win.cc", | 38 "gl_initializer_win.cc", |
| 41 ] | 39 ] |
| 42 | 40 |
| 43 libs = [ "dwmapi.lib" ] | 41 libs = [ "dwmapi.lib" ] |
| 44 ldflags = [ "/DELAYLOAD:dwmapi.dll" ] | 42 ldflags = [ "/DELAYLOAD:dwmapi.dll" ] |
| 43 |
| 44 if (is_official_build) { |
| 45 include_dirs = [ "//third_party/swiftshader/include" ] |
| 46 } |
| 45 } else if (is_mac) { | 47 } else if (is_mac) { |
| 46 sources += [ | 48 sources += [ |
| 47 "gl_factory_mac.cc", | 49 "gl_factory_mac.cc", |
| 48 "gl_initializer_mac.cc", | 50 "gl_initializer_mac.cc", |
| 49 ] | 51 ] |
| 50 | 52 |
| 51 libs = [ "OpenGL.framework" ] | 53 libs = [ "OpenGL.framework" ] |
| 52 } else if (use_x11) { | 54 } else if (use_x11) { |
| 53 sources += [ | 55 sources += [ |
| 54 "gl_factory_x11.cc", | 56 "gl_factory_x11.cc", |
| 55 "gl_initializer_x11.cc", | 57 "gl_initializer_x11.cc", |
| 56 ] | 58 ] |
| 57 | 59 |
| 58 deps += [ "//ui/gfx/x" ] | 60 deps += [ "//ui/gfx/x" ] |
| 59 } else if (use_ozone) { | 61 } else if (use_ozone) { |
| 60 sources += [ | 62 sources += [ |
| 61 "gl_factory_ozone.cc", | 63 "gl_factory_ozone.cc", |
| 62 "gl_initializer_ozone.cc", | 64 "gl_initializer_ozone.cc", |
| 63 ] | 65 ] |
| 64 | 66 |
| 65 deps += [ "//ui/ozone" ] | 67 deps += [ "//ui/ozone" ] |
| 66 } | 68 } |
| 67 } | 69 } |
| OLD | NEW |