Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: skia/BUILD.gn

Issue 859393004: Update Skia GYP and GN configs to read source lists from opts.gypi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: opts_check_x86.cpp is part of opts now Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | skia/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 (cpu_arch == "arm") { 8 if (cpu_arch == "arm") {
9 import("//build/config/arm.gni") 9 import("//build/config/arm.gni")
10 } 10 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 gypi_skia_effects = 73 gypi_skia_effects =
74 exec_script("//build/gypi_to_gn.py", 74 exec_script("//build/gypi_to_gn.py",
75 [ 75 [
76 rebase_path("//third_party/skia/gyp/effects.gypi"), 76 rebase_path("//third_party/skia/gyp/effects.gypi"),
77 "--replace=<(skia_include_path)=//third_party/skia/include", 77 "--replace=<(skia_include_path)=//third_party/skia/include",
78 "--replace=<(skia_src_path)=//third_party/skia/src", 78 "--replace=<(skia_src_path)=//third_party/skia/src",
79 ], 79 ],
80 "scope", 80 "scope",
81 [ "//third_party/skia/gyp/effects.gypi" ]) 81 [ "//third_party/skia/gyp/effects.gypi" ])
82 82
83 # The list of Skia utilss that are to be set for chromium. 83 # The list of Skia utils that are to be set for chromium.
84 gypi_skia_utils = 84 gypi_skia_utils =
85 exec_script("//build/gypi_to_gn.py", 85 exec_script("//build/gypi_to_gn.py",
86 [ 86 [
87 rebase_path("//third_party/skia/gyp/utils.gypi"), 87 rebase_path("//third_party/skia/gyp/utils.gypi"),
88 "--replace=<(skia_include_path)=//third_party/skia/include", 88 "--replace=<(skia_include_path)=//third_party/skia/include",
89 "--replace=<(skia_src_path)=//third_party/skia/src", 89 "--replace=<(skia_src_path)=//third_party/skia/src",
90 ], 90 ],
91 "scope", 91 "scope",
92 [ "//third_party/skia/gyp/utils.gypi" ]) 92 [ "//third_party/skia/gyp/utils.gypi" ])
93 93
94 gypi_skia_opts =
95 exec_script("//build/gypi_to_gn.py",
96 [
97 rebase_path("//third_party/skia/gyp/opts.gypi"),
98 "--replace=<(skia_include_path)=//third_party/skia/include",
99 "--replace=<(skia_src_path)=//third_party/skia/src",
100 ],
101 "scope",
102 [ "//third_party/skia/gyp/opts.gypi" ])
103
94 # The list of Skia files is kept in skia_gn_files.gypi. Read it. 104 # The list of Skia files is kept in skia_gn_files.gypi. Read it.
95 gypi_values = 105 gypi_values =
96 exec_script("//build/gypi_to_gn.py", 106 exec_script("//build/gypi_to_gn.py",
97 [ 107 [
98 rebase_path("skia_gn_files.gypi"), 108 rebase_path("skia_gn_files.gypi"),
99 "--replace=<(skia_include_path)=//third_party/skia/include", 109 "--replace=<(skia_include_path)=//third_party/skia/include",
100 "--replace=<(skia_src_path)=//third_party/skia/src", 110 "--replace=<(skia_src_path)=//third_party/skia/src",
101 ], 111 ],
102 "scope", 112 "scope",
103 [ "skia_gn_files.gypi" ]) 113 [ "skia_gn_files.gypi" ])
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 configs += [ "//build/config/compiler:optimize_max" ] 571 configs += [ "//build/config/compiler:optimize_max" ]
562 } 572 }
563 } 573 }
564 574
565 # Separated out so it can be compiled with different flags for SSE. 575 # Separated out so it can be compiled with different flags for SSE.
566 source_set("skia_opts") { 576 source_set("skia_opts") {
567 cflags = [] 577 cflags = []
568 defines = [] 578 defines = []
569 579
570 if (cpu_arch == "x86" || cpu_arch == "x64") { 580 if (cpu_arch == "x86" || cpu_arch == "x64") {
571 sources = [ 581 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
572 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp", 582 gypi_skia_opts.sse41_sources +
573 583 [
574 # SSE 2 584 # Chrome-specific.
575 "//third_party/skia/src/opts/opts_check_x86.cpp", 585 "ext/convolver_SSE2.cc",
576 "//third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp", 586 ]
577 "//third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp",
578 "//third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp",
579 "//third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp",
580 "//third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp",
581 "//third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp",
582 "//third_party/skia/src/opts/SkUtils_opts_SSE2.cpp",
583 "//third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp",
584
585 # SSSE 3
586 "//third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp",
587
588 # SSE 4
589 "//third_party/skia/src/opts/SkBlurImage_opts_SSE4.cpp",
590
591 # Chrome-specific.
592 "ext/convolver_SSE2.cc",
593
594 # These are header files used by this target from the skia one above.
595 "ext/convolver.h",
596 "//third_party/skia/include/core/SkTypes.h",
597 ]
598
599 if (!is_win) {
600 # SSE 4
601 if (cpu_arch == "x86") {
602 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ]
603 } else { # x64
604 sources +=
605 [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ]
606 }
607 }
608 587
609 if (is_linux || is_mac) { 588 if (is_linux || is_mac) {
610 cflags += [ "-msse4.1" ] 589 cflags += [ "-msse4.1" ]
611 } 590 }
612 } else if (cpu_arch == "arm") { 591 } else if (cpu_arch == "arm") {
613 sources = [
614 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp",
615 ]
616
617 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 592 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
618 # ARM), the compiler doesn't like that. 593 # ARM), the compiler doesn't like that.
619 cflags += [ "-fomit-frame-pointer" ] 594 cflags += [ "-fomit-frame-pointer" ]
620 595
621 if (arm_version >= 7) { 596 if (arm_version >= 7) {
597 sources = gypi_skia_opts.armv7_sources
622 if (arm_use_neon || arm_optionally_use_neon) { 598 if (arm_use_neon || arm_optionally_use_neon) {
623 sources += [ 599 sources += gypi_skia_opts.neon_sources
624 "//third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp",
625 "//third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp",
626 "//third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h",
627 "//third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h",
628 "//third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp",
629 "//third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp",
630 "//third_party/skia/src/opts/SkBlurImage_opts_neon.cpp",
631 "//third_party/skia/src/opts/SkMorphology_opts_neon.cpp",
632 "//third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp",
633 "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp",
634 "//third_party/skia/src/opts/memset16_neon.S",
635 "//third_party/skia/src/opts/memset32_neon.S",
636 ]
637 600
638 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 601 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
639 # when running this. 602 # when running this.
640 if (!arm_use_neon) { 603 if (!arm_use_neon) {
641 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 604 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
642 cflags += [ "-mfpu=neon" ] 605 cflags += [ "-mfpu=neon" ]
643 } 606 }
644
645 #ldflags = [
646 # "-march=armv7-a",
647 # "-Wl,--fix-cortex-a8",
648 #]
649 } 607 }
650 }
651
652 # Non-Neon ARM code.
653 if (arm_version < 7 || !arm_use_neon) {
654 sources += [ "//third_party/skia/src/opts/memset.arm.S" ]
655 }
656
657 if (arm_version < 6) {
658 sources += [
659 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp",
660 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp",
661 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp",
662 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp",
663 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp",
664 "//third_party/skia/src/opts/SkUtils_opts_none.cpp",
665 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
666 ]
667 } else { 608 } else {
668 # arm version >= 6. 609 sources = gypi_skia_opts.none_sourcees
669 sources += [
670 "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp",
671 "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp",
672 "//third_party/skia/src/opts/SkBlitRow_opts_arm.h",
673 "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp",
674 "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp",
675 "//third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp",
676 "//third_party/skia/src/opts/SkUtils_opts_arm.cpp",
677 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
678 ]
679 } 610 }
680 } else if (cpu_arch == "mipsel") { 611 } else if (cpu_arch == "mipsel") {
681 cflags += [ "-fomit-frame-pointer" ] 612 cflags += [ "-fomit-frame-pointer" ]
682 sources = [ 613 sources = gypi_skia_opts.none_sources
683 "//third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp",
684 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp",
685 "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp",
686 "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp",
687 "//third_party/skia/src/opts/SkMorphology_opts_none.cpp",
688 "//third_party/skia/src/opts/SkTextureCompression_opts_none.cpp",
689 "//third_party/skia/src/opts/SkUtils_opts_none.cpp",
690 "//third_party/skia/src/opts/SkXfermode_opts_none.cpp",
691 ]
692 } else { 614 } else {
693 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 615 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
694 } 616 }
695 617
696 if (is_android && !is_debug) { 618 if (is_android && !is_debug) {
697 configs -= [ "//build/config/compiler:optimize" ] 619 configs -= [ "//build/config/compiler:optimize" ]
698 configs += [ "//build/config/compiler:optimize_max" ] 620 configs += [ "//build/config/compiler:optimize_max" ]
699 } 621 }
700 622
701 configs -= [ "//build/config/compiler:chromium_code" ] 623 configs -= [ "//build/config/compiler:chromium_code" ]
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 659
738 deps = [ 660 deps = [
739 ":skia", 661 ":skia",
740 "//base", 662 "//base",
741 "//base/test:run_all_unittests", 663 "//base/test:run_all_unittests",
742 "//testing/gtest", 664 "//testing/gtest",
743 "//ui/gfx", 665 "//ui/gfx",
744 "//ui/gfx/geometry", 666 "//ui/gfx/geometry",
745 ] 667 ]
746 } 668 }
OLDNEW
« no previous file with comments | « no previous file | skia/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698