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 } |
| 11 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| 12 import("//build/config/mips.gni") |
| 13 } |
11 | 14 |
12 skia_support_gpu = !is_ios | 15 skia_support_gpu = !is_ios |
13 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) | 16 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) |
14 | 17 |
15 # The list of Skia defines that are to be set for chromium. | 18 # The list of Skia defines that are to be set for chromium. |
16 gypi_skia_defines = | 19 gypi_skia_defines = |
17 exec_script("//build/gypi_to_gn.py", | 20 exec_script("//build/gypi_to_gn.py", |
18 [ | 21 [ |
19 rebase_path( | 22 rebase_path( |
20 "//third_party/skia/gyp/skia_for_chromium_defines.gypi"), | 23 "//third_party/skia/gyp/skia_for_chromium_defines.gypi"), |
21 "--replace=<(skia_include_path)=//third_party/skia/include", | 24 "--replace=<(skia_include_path)=//third_party/skia/include", |
22 "--replace=<(skia_src_path)=//third_party/skia/src", | 25 "--replace=<(skia_src_path)=//third_party/skia/src", |
23 ], | 26 ], |
24 "scope", | 27 "scope", |
25 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ]) | 28 [ "//third_party/skia/gyp/skia_for_chromium_defines.gypi" ]) |
26 | 29 |
27 # The list of Skia core sources that are to be set for chromium. | 30 # The list of Skia core sources that are to be set for chromium. |
28 gypi_skia_core = | 31 gypi_skia_core = |
29 exec_script("//build/gypi_to_gn.py", | 32 exec_script("//build/gypi_to_gn.py", |
30 [ | 33 [ |
31 rebase_path("//third_party/skia/gyp/core.gypi"), | 34 rebase_path("//third_party/skia/gyp/core.gypi"), |
32 "--replace=<(skia_include_path)=//third_party/skia/include", | 35 "--replace=<(skia_include_path)=//third_party/skia/include", |
33 "--replace=<(skia_src_path)=//third_party/skia/src", | 36 "--replace=<(skia_src_path)=//third_party/skia/src", |
34 ], | 37 ], |
35 "scope", | 38 "scope", |
36 [ "//third_party/skia/gyp/core.gypi" ]) | 39 [ "//third_party/skia/gyp/core.gypi" ]) |
37 | 40 |
38 # The list of Skia gpu sources that are to be set for chromium. | 41 # The list of Skia gpu sources that are to be set for chromium. |
39 gypi_skia_gpu = | 42 if (skia_support_gpu) { |
40 exec_script("//build/gypi_to_gn.py", | 43 gypi_skia_gpu = |
41 [ | 44 exec_script("//build/gypi_to_gn.py", |
42 rebase_path("//third_party/skia/gyp/gpu.gypi"), | 45 [ |
43 "--replace=<(skia_include_path)=//third_party/skia/include", | 46 rebase_path("//third_party/skia/gyp/gpu.gypi"), |
44 "--replace=<(skia_src_path)=//third_party/skia/src", | 47 "--replace=<(skia_include_path)=//third_party/skia/include", |
45 ], | 48 "--replace=<(skia_src_path)=//third_party/skia/src", |
46 "scope", | 49 ], |
47 [ "//third_party/skia/gyp/gpu.gypi" ]) | 50 "scope", |
| 51 [ "//third_party/skia/gyp/gpu.gypi" ]) |
| 52 } |
48 | 53 |
49 # The list of Skia pdf sources that are to be set for chromium. | 54 # The list of Skia pdf sources that are to be set for chromium. |
50 gypi_skia_pdf = | 55 if (skia_support_pdf) { |
51 exec_script("//build/gypi_to_gn.py", | 56 gypi_skia_pdf = |
52 [ | 57 exec_script("//build/gypi_to_gn.py", |
53 rebase_path("//third_party/skia/gyp/pdf.gypi"), | 58 [ |
54 "--replace=<(skia_include_path)=//third_party/skia/include", | 59 rebase_path("//third_party/skia/gyp/pdf.gypi"), |
55 "--replace=<(skia_src_path)=//third_party/skia/src", | 60 "--replace=<(skia_include_path)=//third_party/skia/include", |
56 ], | 61 "--replace=<(skia_src_path)=//third_party/skia/src", |
57 "scope", | 62 ], |
58 [ "//third_party/skia/gyp/pdf.gypi" ]) | 63 "scope", |
| 64 [ "//third_party/skia/gyp/pdf.gypi" ]) |
| 65 } |
59 | 66 |
60 # The list of Skia effects that are to be set for chromium. | 67 # The list of Skia effects that are to be set for chromium. |
61 gypi_skia_effects = | 68 gypi_skia_effects = |
62 exec_script("//build/gypi_to_gn.py", | 69 exec_script("//build/gypi_to_gn.py", |
63 [ | 70 [ |
64 rebase_path("//third_party/skia/gyp/effects.gypi"), | 71 rebase_path("//third_party/skia/gyp/effects.gypi"), |
65 "--replace=<(skia_include_path)=//third_party/skia/include", | 72 "--replace=<(skia_include_path)=//third_party/skia/include", |
66 "--replace=<(skia_src_path)=//third_party/skia/src", | 73 "--replace=<(skia_src_path)=//third_party/skia/src", |
67 ], | 74 ], |
68 "scope", | 75 "scope", |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 source_set("skia_opts") { | 537 source_set("skia_opts") { |
531 cflags = [] | 538 cflags = [] |
532 defines = [] | 539 defines = [] |
533 | 540 |
534 if (current_cpu == "x86" || current_cpu == "x64") { | 541 if (current_cpu == "x86" || current_cpu == "x64") { |
535 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + | 542 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + |
536 gypi_skia_opts.sse41_sources + | 543 gypi_skia_opts.sse41_sources + |
537 [ | 544 [ |
538 # Chrome-specific. | 545 # Chrome-specific. |
539 "ext/convolver_SSE2.cc", | 546 "ext/convolver_SSE2.cc", |
| 547 "ext/convolver_SSE2.h", |
540 ] | 548 ] |
541 | 549 |
542 if (is_linux || is_mac) { | 550 if (is_linux || is_mac) { |
543 cflags += [ "-msse4.1" ] | 551 cflags += [ "-msse4.1" ] |
544 } | 552 } |
545 } else if (current_cpu == "arm") { | 553 } else if (current_cpu == "arm") { |
546 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 554 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
547 # ARM), the compiler doesn't like that. | 555 # ARM), the compiler doesn't like that. |
548 cflags += [ "-fomit-frame-pointer" ] | 556 cflags += [ "-fomit-frame-pointer" ] |
549 | 557 |
550 if (arm_version >= 7) { | 558 if (arm_version >= 7) { |
551 sources = gypi_skia_opts.armv7_sources | 559 sources = gypi_skia_opts.armv7_sources |
552 if (arm_use_neon || arm_optionally_use_neon) { | 560 if (arm_use_neon || arm_optionally_use_neon) { |
553 sources += gypi_skia_opts.neon_sources | 561 sources += gypi_skia_opts.neon_sources |
554 | 562 |
555 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon | 563 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon |
556 # when running this. | 564 # when running this. |
557 if (!arm_use_neon) { | 565 if (!arm_use_neon) { |
558 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 566 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
559 cflags += [ "-mfpu=neon" ] | 567 cflags += [ "-mfpu=neon" ] |
560 } | 568 } |
561 } | 569 } |
562 } else { | 570 } else { |
563 sources = gypi_skia_opts.none_sourcees | 571 sources = gypi_skia_opts.none_sourcees |
564 } | 572 } |
565 } else if (current_cpu == "mipsel") { | 573 } else if (current_cpu == "mipsel") { |
566 cflags += [ "-fomit-frame-pointer" ] | 574 cflags += [ "-fomit-frame-pointer" ] |
567 sources = gypi_skia_opts.none_sources | 575 |
| 576 if (mips_dsp_rev >= 1) { |
| 577 sources = gypi_skia_opts.mips_dsp_sources |
| 578 if (mips_dsp_rev >= 2) { |
| 579 sources += [ |
| 580 # Chrome-specific. |
| 581 "ext/convolver_mips_dspr2.cc", |
| 582 "ext/convolver_mips_dspr2.h", |
| 583 ] |
| 584 } |
| 585 } else { |
| 586 sources = gypi_skia_opts.none_sources |
| 587 } |
568 } else { | 588 } else { |
569 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") | 589 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") |
570 } | 590 } |
571 | 591 |
572 if (is_android && !is_debug) { | 592 if (is_android && !is_debug) { |
573 configs -= [ "//build/config/compiler:optimize" ] | 593 configs -= [ "//build/config/compiler:optimize" ] |
574 configs += [ "//build/config/compiler:optimize_max" ] | 594 configs += [ "//build/config/compiler:optimize_max" ] |
575 } | 595 } |
576 | 596 |
577 configs -= [ "//build/config/compiler:chromium_code" ] | 597 configs -= [ "//build/config/compiler:chromium_code" ] |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 sources = [ | 654 sources = [ |
635 "tools/filter_fuzz_stub/filter_fuzz_stub.cc", | 655 "tools/filter_fuzz_stub/filter_fuzz_stub.cc", |
636 ] | 656 ] |
637 | 657 |
638 deps = [ | 658 deps = [ |
639 ":skia", | 659 ":skia", |
640 "//base", | 660 "//base", |
641 ] | 661 ] |
642 } | 662 } |
643 } | 663 } |
OLD | NEW |