Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
| 7 if (cpu_arch == "arm") { | 7 if (cpu_arch == "arm") { |
| 8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 } | 67 } |
| 68 | 68 |
| 69 if (is_android) { | 69 if (is_android) { |
| 70 defines += [ | 70 defines += [ |
| 71 "SK_BUILD_FOR_ANDROID", | 71 "SK_BUILD_FOR_ANDROID", |
| 72 "USE_CHROMIUM_SKIA", | 72 "USE_CHROMIUM_SKIA", |
| 73 ] | 73 ] |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 config("skia_dependent_config") { | |
| 78 } | |
| 79 | |
| 80 # Internal-facing config for Skia library code. | 77 # Internal-facing config for Skia library code. |
| 81 config("skia_library_config") { | 78 config("skia_library_config") { |
| 79 # These include directories are only included for Skia code and are not | |
| 80 # exported to dependents. It's not clear if this is on purpose, but this | |
| 81 # matches the GYP build. | |
| 82 include_dirs = [] | |
| 83 if (is_mac || is_ios) { | |
| 84 include_dirs += [ "//third_party/skia/include/utils/mac" ] | |
| 85 } | |
| 86 if (is_mac) { | |
| 87 include_dirs += [ "//third_party/skia/include/utils/ios" ] | |
| 88 } | |
| 89 | |
| 82 defines = [ | 90 defines = [ |
| 83 #skia_export_defines ???) TODO | 91 #skia_export_defines ???) TODO |
| 84 | 92 |
| 85 # skia uses static initializers to initialize the serialization logic | 93 # skia uses static initializers to initialize the serialization logic |
| 86 # of its "pictures" library. This is currently not used in chrome; if | 94 # of its "pictures" library. This is currently not used in chrome; if |
| 87 # it ever gets used the processes that use it need to call | 95 # it ever gets used the processes that use it need to call |
| 88 # SkGraphics::Init(). | 96 # SkGraphics::Init(). |
| 89 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0", | 97 "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0", |
| 90 | 98 |
| 91 # Disable this check because it is too strict for some Chromium-specific | 99 # Disable this check because it is too strict for some Chromium-specific |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 "ext/vector_platform_device_skia.cc" | 251 "ext/vector_platform_device_skia.cc" |
| 244 ] | 252 ] |
| 245 } | 253 } |
| 246 | 254 |
| 247 # Fixup skia library sources. | 255 # Fixup skia library sources. |
| 248 if (is_win) { | 256 if (is_win) { |
| 249 sources -= [ | 257 sources -= [ |
| 250 "//third_party/skia/src/ports/SkOSFile_posix.cpp", | 258 "//third_party/skia/src/ports/SkOSFile_posix.cpp", |
| 251 "//third_party/skia/src/ports/SkTime_Unix.cpp", | 259 "//third_party/skia/src/ports/SkTime_Unix.cpp", |
| 252 "//third_party/skia/src/ports/SkTLS_pthread.cpp", | 260 "//third_party/skia/src/ports/SkTLS_pthread.cpp", |
| 253 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", | |
| 254 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", | |
| 255 ] | 261 ] |
| 256 } else { | 262 } else { |
| 257 sources -= [ | 263 sources -= [ |
| 258 "//third_party/skia/src/ports/SkFontHost_win.cpp", | 264 "//third_party/skia/src/ports/SkFontHost_win.cpp", |
| 259 "//third_party/skia/src/ports/SkFontHost_win_dw.cpp", | 265 "//third_party/skia/src/ports/SkFontHost_win_dw.cpp", |
| 260 "//third_party/skia/src/ports/SkFontMgr_default_gdi.cpp", | 266 "//third_party/skia/src/ports/SkFontMgr_default_gdi.cpp", |
| 261 "//third_party/skia/src/ports/SkOSFile_win.cpp", | 267 "//third_party/skia/src/ports/SkOSFile_win.cpp", |
| 262 "//third_party/skia/src/ports/SkTLS_win.cpp", | 268 "//third_party/skia/src/ports/SkTLS_win.cpp", |
| 263 "//third_party/skia/src/utils/SkThreadUtils_win.cpp", | 269 "//third_party/skia/src/utils/SkThreadUtils_win.cpp", |
| 264 ] | 270 ] |
| 265 } | 271 } |
| 266 if (!is_android) { | 272 if (!is_android) { |
| 267 sources -= [ | 273 sources -= [ |
| 268 "//third_party/skia/src/ports/SkFontConfigInterface_android.cpp", | 274 "//third_party/skia/src/ports/SkFontConfigInterface_android.cpp", |
| 269 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", | 275 "//third_party/skia/src/ports/SkFontConfigParser_android.cpp", |
| 270 ] | 276 ] |
| 271 } | 277 } |
| 272 if (!is_mac) { | 278 if (!is_mac) { |
| 273 sources -= [ | 279 sources -= [ |
| 274 "//third_party/skia/src/ports/SkFontHost_mac.cpp", | 280 "//third_party/skia/src/ports/SkFontHost_mac.cpp", |
| 275 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", | 281 "//third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp", |
| 276 ] | 282 ] |
| 277 } | 283 } |
| 278 if (!is_linux) { | 284 if (!is_linux) { |
| 279 sources -= [ | 285 sources -= [ |
| 286 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", | |
| 287 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", | |
| 280 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", | 288 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", |
| 281 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", | 289 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", |
| 282 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", | 290 "//third_party/skia/src/ports/SkFontHost_fontconfig.cpp", |
| 283 "//third_party/skia/src/ports/SkFontHost_linux.cpp", | 291 "//third_party/skia/src/ports/SkFontHost_linux.cpp", |
| 284 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", | 292 "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp", |
| 285 ] | 293 ] |
| 286 } else if (!is_android) { | 294 } else if (!is_android) { |
| 287 sources -= [ | 295 sources -= [ |
| 288 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", | 296 "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp", |
| 289 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", | 297 "//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp", |
| 290 ] | 298 ] |
| 291 } | 299 } |
| 292 if (!is_posix) { | 300 if (!is_posix) { |
| 293 sources -= [ | 301 sources -= [ |
| 294 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", | 302 "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", |
| 295 ] | 303 ] |
| 296 } | 304 } |
| 297 | 305 |
| 298 if (!use_cairo) { | 306 if (!use_cairo) { |
| 299 sources -= [ | 307 sources -= [ |
| 300 "ext/bitmap_platform_device_cairo.cc", | 308 "ext/bitmap_platform_device_cairo.cc", |
| 301 "ext/bitmap_platform_device_cairo.h", | 309 "ext/bitmap_platform_device_cairo.h", |
| 302 ] | 310 ] |
| 303 } | 311 } |
| 304 | 312 |
| 313 if (is_clang) { | |
| 314 # Skia won't compile with some of the more strict clang warnings. | |
| 315 # e.g. it does: | |
| 316 # SkASSERT(!"sk_out_of_memory"); | |
|
Nico
2014/07/10 20:39:31
They had fixed all these a while ago when I asked
| |
| 317 configs -= [ "//build/config/clang:extra_warnings" ] | |
| 318 } | |
| 319 | |
| 305 configs -= [ "//build/config/compiler:chromium_code" ] | 320 configs -= [ "//build/config/compiler:chromium_code" ] |
| 306 configs += [ | 321 configs += [ |
| 307 ":skia_library_config", | 322 ":skia_library_config", |
| 308 "//build/config/compiler:no_chromium_code" | 323 "//build/config/compiler:no_chromium_code" |
| 309 ] | 324 ] |
| 310 direct_dependent_configs = [ ":skia_config" ] | 325 direct_dependent_configs = [ ":skia_config" ] |
| 311 | 326 |
| 312 deps = [ | 327 deps = [ |
| 313 ":skia_opts", | 328 ":skia_opts", |
| 314 "//base", | 329 "//base", |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 | 382 |
| 368 configs -= [ "//build/config/compiler:chromium_code" ] | 383 configs -= [ "//build/config/compiler:chromium_code" ] |
| 369 configs += [ | 384 configs += [ |
| 370 ":skia_config", | 385 ":skia_config", |
| 371 "//build/config/compiler:no_chromium_code" | 386 "//build/config/compiler:no_chromium_code" |
| 372 ] | 387 ] |
| 373 | 388 |
| 374 # TODO(brettw) uncomment when visibility is supported. | 389 # TODO(brettw) uncomment when visibility is supported. |
| 375 #visibility = ":skia" | 390 #visibility = ":skia" |
| 376 } | 391 } |
| OLD | NEW |