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 if (current_cpu == "arm") { | 8 if (current_cpu == "arm") { |
9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
10 } | 10 } |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 defines = [ "SK_CPU_SSE_LEVEL=31" ] | 513 defines = [ "SK_CPU_SSE_LEVEL=31" ] |
514 } | 514 } |
515 visibility = [ ":skia_opts" ] | 515 visibility = [ ":skia_opts" ] |
516 configs -= [ "//build/config/compiler:chromium_code" ] | 516 configs -= [ "//build/config/compiler:chromium_code" ] |
517 configs += [ | 517 configs += [ |
518 ":skia_config", | 518 ":skia_config", |
519 ":skia_library_config", | 519 ":skia_library_config", |
520 "//build/config/compiler:no_chromium_code", | 520 "//build/config/compiler:no_chromium_code", |
521 ] | 521 ] |
522 } | 522 } |
523 source_set("skia_opts_sse4") { | 523 source_set("skia_opts_sse41") { |
524 sources = gypi_skia_opts.sse41_sources | 524 sources = gypi_skia_opts.sse41_sources |
525 if (!is_win || is_clang) { | 525 if (!is_win || is_clang) { |
526 cflags = [ "-msse4.1" ] | 526 cflags = [ "-msse4.1" ] |
527 } | 527 } |
528 if (is_win) { | 528 if (is_win) { |
529 defines = [ "SK_CPU_SSE_LEVEL=41" ] | 529 defines = [ "SK_CPU_SSE_LEVEL=41" ] |
530 } | 530 } |
531 visibility = [ ":skia_opts" ] | 531 visibility = [ ":skia_opts" ] |
532 configs -= [ "//build/config/compiler:chromium_code" ] | 532 configs -= [ "//build/config/compiler:chromium_code" ] |
533 configs += [ | 533 configs += [ |
534 ":skia_config", | 534 ":skia_config", |
535 ":skia_library_config", | 535 ":skia_library_config", |
536 "//build/config/compiler:no_chromium_code", | 536 "//build/config/compiler:no_chromium_code", |
537 ] | 537 ] |
538 } | 538 } |
| 539 source_set("skia_opts_sse42") { |
| 540 sources = gypi_skia_opts.sse42_sources |
| 541 if (!is_win || is_clang) { |
| 542 cflags = [ "-msse4.2" ] |
| 543 } |
| 544 if (is_win) { |
| 545 defines = [ "SK_CPU_SSE_LEVEL=42" ] |
| 546 } |
| 547 visibility = [ ":skia_opts" ] |
| 548 configs -= [ "//build/config/compiler:chromium_code" ] |
| 549 configs += [ |
| 550 ":skia_config", |
| 551 ":skia_library_config", |
| 552 "//build/config/compiler:no_chromium_code", |
| 553 ] |
| 554 } |
| 555 source_set("skia_opts_avx") { |
| 556 sources = gypi_skia_opts.avx_sources |
| 557 if (!is_win || is_clang) { |
| 558 cflags = [ "-mavx" ] |
| 559 } |
| 560 if (is_win) { |
| 561 cflags = [ "/arch:AVX" ] |
| 562 } |
| 563 visibility = [ ":skia_opts" ] |
| 564 configs -= [ "//build/config/compiler:chromium_code" ] |
| 565 configs += [ |
| 566 ":skia_config", |
| 567 ":skia_library_config", |
| 568 "//build/config/compiler:no_chromium_code", |
| 569 ] |
| 570 } |
| 571 source_set("skia_opts_avx2") { |
| 572 sources = gypi_skia_opts.avx2_sources |
| 573 if (!is_win || is_clang) { |
| 574 cflags = [ "-mavx2" ] |
| 575 } |
| 576 if (is_win) { |
| 577 cflags = [ "/arch:AVX2" ] |
| 578 } |
| 579 visibility = [ ":skia_opts" ] |
| 580 configs -= [ "//build/config/compiler:chromium_code" ] |
| 581 configs += [ |
| 582 ":skia_config", |
| 583 ":skia_library_config", |
| 584 "//build/config/compiler:no_chromium_code", |
| 585 ] |
| 586 } |
539 } | 587 } |
540 source_set("skia_opts") { | 588 source_set("skia_opts") { |
541 cflags = [] | 589 cflags = [] |
542 defines = [] | 590 defines = [] |
543 | 591 |
544 deps = [ | 592 deps = [ |
545 "//base", | 593 "//base", |
546 ] | 594 ] |
547 | 595 |
548 if (current_cpu == "x86" || current_cpu == "x64") { | 596 if (current_cpu == "x86" || current_cpu == "x64") { |
549 sources = gypi_skia_opts.sse2_sources | 597 sources = gypi_skia_opts.sse2_sources |
550 deps += [ | 598 deps += [ |
551 ":skia_opts_sse3", | 599 ":skia_opts_sse3", |
552 ":skia_opts_sse4", | 600 ":skia_opts_sse41", |
| 601 ":skia_opts_sse42", |
| 602 ":skia_opts_avx", |
| 603 ":skia_opts_avx2", |
553 ] | 604 ] |
554 } else if (current_cpu == "arm") { | 605 } else if (current_cpu == "arm") { |
555 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 606 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
556 # ARM), the compiler doesn't like that. | 607 # ARM), the compiler doesn't like that. |
557 cflags += [ "-fomit-frame-pointer" ] | 608 cflags += [ "-fomit-frame-pointer" ] |
558 | 609 |
559 if (arm_version >= 7) { | 610 if (arm_version >= 7) { |
560 sources = gypi_skia_opts.armv7_sources | 611 sources = gypi_skia_opts.armv7_sources |
561 if (arm_use_neon || arm_optionally_use_neon) { | 612 if (arm_use_neon || arm_optionally_use_neon) { |
562 sources += gypi_skia_opts.neon_sources | 613 sources += gypi_skia_opts.neon_sources |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 ] | 711 ] |
661 | 712 |
662 deps = [ | 713 deps = [ |
663 ":skia", | 714 ":skia", |
664 "//base", | 715 "//base", |
665 "//base/test:test_support", | 716 "//base/test:test_support", |
666 "//build/config/sanitizers:deps", | 717 "//build/config/sanitizers:deps", |
667 ] | 718 ] |
668 } | 719 } |
669 } | 720 } |
OLD | NEW |