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 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 import("//third_party/skia/gn/shared_sources.gni") | 8 import("//third_party/skia/gn/shared_sources.gni") |
9 | 9 |
10 if (current_cpu == "arm") { | 10 if (current_cpu == "arm") { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 # PDFium sources. | 168 # PDFium sources. |
169 "config/SkUserConfig.h", | 169 "config/SkUserConfig.h", |
170 "ext/google_logging.cc", | 170 "ext/google_logging.cc", |
171 ] | 171 ] |
172 | 172 |
173 # The skia gypi values are relative to the skia_dir, so we need to rebase. | 173 # The skia gypi values are relative to the skia_dir, so we need to rebase. |
174 sources += skia_core_sources | 174 sources += skia_core_sources |
175 sources += skia_effects_sources | 175 sources += skia_effects_sources |
176 sources += skia_utils_sources | 176 sources += skia_utils_sources |
177 sources += [ | 177 sources += [ |
178 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", | |
179 | |
180 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", | 178 "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp", |
181 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", | 179 "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp", |
| 180 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", |
182 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", | 181 "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", |
183 "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", | |
184 "//third_party/skia/src/ports/SkFontHost_win.cpp", | 182 "//third_party/skia/src/ports/SkFontHost_win.cpp", |
185 "//third_party/skia/src/ports/SkFontMgr_android.cpp", | 183 "//third_party/skia/src/ports/SkFontMgr_android.cpp", |
186 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", | 184 "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp", |
187 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", | 185 "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", |
188 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", | 186 "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", |
189 "//third_party/skia/src/ports/SkImageEncoder_none.cpp", | 187 "//third_party/skia/src/ports/SkImageEncoder_none.cpp", |
| 188 "//third_party/skia/src/ports/SkImageGenerator_none.cpp", |
190 "//third_party/skia/src/ports/SkOSFile_posix.cpp", | 189 "//third_party/skia/src/ports/SkOSFile_posix.cpp", |
191 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", | 190 "//third_party/skia/src/ports/SkOSFile_stdio.cpp", |
192 "//third_party/skia/src/ports/SkOSFile_win.cpp", | 191 "//third_party/skia/src/ports/SkOSFile_win.cpp", |
193 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", | 192 "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp", |
194 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", | 193 "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp", |
195 "//third_party/skia/src/ports/SkTLS_pthread.cpp", | 194 "//third_party/skia/src/ports/SkTLS_pthread.cpp", |
196 "//third_party/skia/src/ports/SkTLS_win.cpp", | 195 "//third_party/skia/src/ports/SkTLS_win.cpp", |
197 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", | 196 "//third_party/skia/src/ports/SkTypeface_win_dw.cpp", |
198 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", | 197 "//third_party/skia/src/sfnt/SkOTTable_name.cpp", |
199 "//third_party/skia/src/sfnt/SkOTUtils.cpp", | 198 "//third_party/skia/src/sfnt/SkOTUtils.cpp", |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 cflags = [ "/arch:AVX" ] | 407 cflags = [ "/arch:AVX" ] |
409 } | 408 } |
410 visibility = [ ":skia_opts" ] | 409 visibility = [ ":skia_opts" ] |
411 configs -= [ "//build/config/compiler:chromium_code" ] | 410 configs -= [ "//build/config/compiler:chromium_code" ] |
412 configs += [ | 411 configs += [ |
413 ":skia_config", | 412 ":skia_config", |
414 ":skia_library_config", | 413 ":skia_library_config", |
415 "//build/config/compiler:no_chromium_code", | 414 "//build/config/compiler:no_chromium_code", |
416 ] | 415 ] |
417 } | 416 } |
418 source_set("skia_opts_avx2") { | 417 source_set("skia_opts_hsw") { |
419 sources = skia_opts.avx2_sources | 418 sources = skia_opts.hsw_sources |
420 if (!is_win) { | 419 if (!is_win) { |
421 cflags = [ "-mavx2" ] | 420 cflags = [ |
| 421 "-mavx2", |
| 422 "-mbmi", |
| 423 "-mbmi2", |
| 424 "-mf16c", |
| 425 "-mfma", |
| 426 ] |
422 } | 427 } |
423 if (is_win) { | 428 if (is_win) { |
424 cflags = [ "/arch:AVX2" ] | 429 cflags = [ "/arch:AVX2" ] |
425 } | 430 } |
426 visibility = [ ":skia_opts" ] | 431 visibility = [ ":skia_opts" ] |
427 configs -= [ "//build/config/compiler:chromium_code" ] | 432 configs -= [ "//build/config/compiler:chromium_code" ] |
428 configs += [ | 433 configs += [ |
429 ":skia_config", | 434 ":skia_config", |
430 ":skia_library_config", | 435 ":skia_library_config", |
431 "//build/config/compiler:no_chromium_code", | 436 "//build/config/compiler:no_chromium_code", |
432 ] | 437 ] |
433 } | 438 } |
434 } | 439 } |
435 source_set("skia_opts") { | 440 source_set("skia_opts") { |
436 cflags = [] | 441 cflags = [] |
437 defines = [] | 442 defines = [] |
438 | 443 |
439 if (current_cpu == "x86" || current_cpu == "x64") { | 444 if (current_cpu == "x86" || current_cpu == "x64") { |
440 sources = skia_opts.sse2_sources | 445 sources = skia_opts.sse2_sources |
441 deps = [ | 446 deps = [ |
442 ":skia_opts_avx", | 447 ":skia_opts_avx", |
443 ":skia_opts_avx2", | 448 ":skia_opts_hsw", |
444 ":skia_opts_sse3", | 449 ":skia_opts_sse3", |
445 ":skia_opts_sse41", | 450 ":skia_opts_sse41", |
446 ":skia_opts_sse42", | 451 ":skia_opts_sse42", |
447 ] | 452 ] |
448 } else if (current_cpu == "arm") { | 453 } else if (current_cpu == "arm") { |
449 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 454 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
450 # ARM), the compiler doesn't like that. | 455 # ARM), the compiler doesn't like that. |
451 cflags += [ "-fomit-frame-pointer" ] | 456 cflags += [ "-fomit-frame-pointer" ] |
452 | 457 |
453 if (arm_version >= 7) { | 458 if (arm_version >= 7) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 494 |
490 configs -= [ "//build/config/compiler:chromium_code" ] | 495 configs -= [ "//build/config/compiler:chromium_code" ] |
491 configs += [ | 496 configs += [ |
492 ":skia_config", | 497 ":skia_config", |
493 ":skia_library_config", | 498 ":skia_library_config", |
494 "//build/config/compiler:no_chromium_code", | 499 "//build/config/compiler:no_chromium_code", |
495 ] | 500 ] |
496 | 501 |
497 visibility = [ ":skia" ] | 502 visibility = [ ":skia" ] |
498 } | 503 } |
OLD | NEW |