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

Side by Side Diff: skia/BUILD.gn

Issue 371853007: Fix optional neon support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-missing-files
Patch Set: Rebase Created 6 years, 4 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 | « build/config/compiler/BUILD.gn ('k') | no next file » | 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 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 "SK_IGNORE_BLURRED_RRECT_OPT", 173 "SK_IGNORE_BLURRED_RRECT_OPT",
174 174
175 "SK_IGNORE_QUAD_RR_CORNERS_OPT", 175 "SK_IGNORE_QUAD_RR_CORNERS_OPT",
176 176
177 # this flag forces Skia not to use typographic metrics with GDI. 177 # this flag forces Skia not to use typographic metrics with GDI.
178 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS", 178 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS",
179 179
180 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", 180 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE",
181 ] 181 ]
182 182
183 if (cpu_arch == "arm") {
184 if (arm_use_neon) {
185 defines += [ "__ARM_HAVE_NEON" ]
186 }
187 if (arm_optionally_use_neon) {
188 defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ]
189 }
190 }
191
183 # Settings for text blitting, chosen to approximate the system browser. 192 # Settings for text blitting, chosen to approximate the system browser.
184 if (is_linux) { 193 if (is_linux) {
185 defines += [ 194 defines += [
186 "SK_GAMMA_EXPONENT=1.2", 195 "SK_GAMMA_EXPONENT=1.2",
187 "SK_GAMMA_CONTRAST=0.2", 196 "SK_GAMMA_CONTRAST=0.2",
188 "SK_HIGH_QUALITY_IS_LANCZOS", 197 "SK_HIGH_QUALITY_IS_LANCZOS",
189 ] 198 ]
190 } else if (is_android) { 199 } else if (is_android) {
191 defines += [ 200 defines += [
192 "SK_GAMMA_APPLY_TO_A8", 201 "SK_GAMMA_APPLY_TO_A8",
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 628
620 cflags += [ 629 cflags += [
621 # The neon assembly contains conditional instructions which aren't 630 # The neon assembly contains conditional instructions which aren't
622 # enclosed in an IT block. The assembler complains without this 631 # enclosed in an IT block. The assembler complains without this
623 # option. See #86592. 632 # option. See #86592.
624 "-Wa,-mimplicit-it=always", 633 "-Wa,-mimplicit-it=always",
625 ] 634 ]
626 635
627 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 636 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
628 # when running this. 637 # when running this.
629 assert(arm_fpu == "neon") 638 if (!arm_use_neon) {
639 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
640 cflags += [
641 "-mfpu=neon"
642 ]
643 }
630 644
631 #ldflags = [ 645 #ldflags = [
632 # "-march=armv7-a", 646 # "-march=armv7-a",
633 # "-Wl,--fix-cortex-a8", 647 # "-Wl,--fix-cortex-a8",
634 #] 648 #]
635 } 649 }
636
637 if (arm_use_neon) {
638 defines += [ "__ARM_HAVE_NEON" ]
639 }
640 if (arm_optionally_use_neon) {
641 defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ]
642 }
643 } 650 }
644 651
645 # Non-Neon ARM code. 652 # Non-Neon ARM code.
646 if (arm_version < 7 || !arm_use_neon) { 653 if (arm_version < 7 || !arm_use_neon) {
647 sources += [ "//third_party/skia/src/opts/memset.arm.S" ] 654 sources += [ "//third_party/skia/src/opts/memset.arm.S" ]
648 } 655 }
649 656
650 if (arm_version < 6) { 657 if (arm_version < 6) {
651 sources += [ 658 sources += [
652 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", 659 "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp",
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 ":skia_config", 699 ":skia_config",
693 "//build/config/compiler:no_chromium_code" 700 "//build/config/compiler:no_chromium_code"
694 ] 701 ]
695 702
696 deps = [ 703 deps = [
697 "//base", 704 "//base",
698 ] 705 ]
699 706
700 visibility = ":skia" 707 visibility = ":skia"
701 } 708 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698