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

Side by Side Diff: skia/BUILD.gn

Issue 913373002: Update Chomium's build files to work w/ latest GN binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_cpu_arch_changes
Patch Set: merge to #317214 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
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 (current_cpu == "arm") {
9 import("//build/config/arm.gni") 9 import("//build/config/arm.gni")
10 } 10 }
11 11
12 skia_support_gpu = !is_ios 12 skia_support_gpu = !is_ios
13 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) 13 skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview)
14 14
15 # The list of Skia defines that are to be set for blink. 15 # The list of Skia defines that are to be set for blink.
16 gypi_blink_skia_defines = 16 gypi_blink_skia_defines =
17 exec_script("//build/gypi_to_gn.py", 17 exec_script("//build/gypi_to_gn.py",
18 [ 18 [
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (is_mac) { 184 if (is_mac) {
185 include_dirs += [ "//third_party/skia/include/utils/ios" ] 185 include_dirs += [ "//third_party/skia/include/utils/ios" ]
186 } 186 }
187 187
188 defines = [] 188 defines = []
189 189
190 if (component_mode == "shared_library") { 190 if (component_mode == "shared_library") {
191 defines += [ "SKIA_IMPLEMENTATION=1" ] 191 defines += [ "SKIA_IMPLEMENTATION=1" ]
192 } 192 }
193 193
194 if (cpu_arch == "arm") { 194 if (current_cpu == "arm") {
195 if (arm_use_neon) { 195 if (arm_use_neon) {
196 defines += [ "SK_ARM_HAS_NEON" ] 196 defines += [ "SK_ARM_HAS_NEON" ]
197 } 197 }
198 if (arm_optionally_use_neon) { 198 if (arm_optionally_use_neon) {
199 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ] 199 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ]
200 } 200 }
201 } 201 }
202 202
203 # Settings for text blitting, chosen to approximate the system browser. 203 # Settings for text blitting, chosen to approximate the system browser.
204 if (is_linux) { 204 if (is_linux) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 "ext/skia_utils_win.cc", 304 "ext/skia_utils_win.cc",
305 "ext/skia_utils_win.h", 305 "ext/skia_utils_win.h",
306 ] 306 ]
307 307
308 # The skia gypi values are relative to the skia_dir, so we need to rebase. 308 # The skia gypi values are relative to the skia_dir, so we need to rebase.
309 sources += gypi_skia_core.sources 309 sources += gypi_skia_core.sources
310 sources += gypi_skia_effects.sources 310 sources += gypi_skia_effects.sources
311 sources += gypi_skia_utils.sources 311 sources += gypi_skia_utils.sources
312 sources += gypi_values.skia_library_sources 312 sources += gypi_values.skia_library_sources
313 313
314 if (cpu_arch == "arm") { 314 if (current_cpu == "arm") {
315 sources += [ 315 sources += [
316 "//third_party/skia/src/core/SkUtilsArm.cpp", 316 "//third_party/skia/src/core/SkUtilsArm.cpp",
317 "//third_party/skia/src/core/SkUtilsArm.h", 317 "//third_party/skia/src/core/SkUtilsArm.h",
318 ] 318 ]
319 } 319 }
320 320
321 # GPU 321 # GPU
322 if (skia_support_gpu) { 322 if (skia_support_gpu) {
323 sources += gypi_skia_gpu.skgpu_sources 323 sources += gypi_skia_gpu.skgpu_sources
324 sources += gypi_skia_gpu.skgpu_null_gl_sources 324 sources += gypi_skia_gpu.skgpu_null_gl_sources
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 configs -= [ "//build/config/compiler:optimize" ] 538 configs -= [ "//build/config/compiler:optimize" ]
539 configs += [ "//build/config/compiler:optimize_max" ] 539 configs += [ "//build/config/compiler:optimize_max" ]
540 } 540 }
541 } 541 }
542 542
543 # Separated out so it can be compiled with different flags for SSE. 543 # Separated out so it can be compiled with different flags for SSE.
544 source_set("skia_opts") { 544 source_set("skia_opts") {
545 cflags = [] 545 cflags = []
546 defines = [] 546 defines = []
547 547
548 if (cpu_arch == "x86" || cpu_arch == "x64") { 548 if (current_cpu == "x86" || current_cpu == "x64") {
549 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + 549 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
550 gypi_skia_opts.sse41_sources + 550 gypi_skia_opts.sse41_sources +
551 [ 551 [
552 # Chrome-specific. 552 # Chrome-specific.
553 "ext/convolver_SSE2.cc", 553 "ext/convolver_SSE2.cc",
554 ] 554 ]
555 555
556 if (is_linux || is_mac) { 556 if (is_linux || is_mac) {
557 cflags += [ "-msse4.1" ] 557 cflags += [ "-msse4.1" ]
558 } 558 }
559 } else if (cpu_arch == "arm") { 559 } else if (current_cpu == "arm") {
560 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 560 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
561 # ARM), the compiler doesn't like that. 561 # ARM), the compiler doesn't like that.
562 cflags += [ "-fomit-frame-pointer" ] 562 cflags += [ "-fomit-frame-pointer" ]
563 563
564 if (arm_version >= 7) { 564 if (arm_version >= 7) {
565 sources = gypi_skia_opts.armv7_sources 565 sources = gypi_skia_opts.armv7_sources
566 if (arm_use_neon || arm_optionally_use_neon) { 566 if (arm_use_neon || arm_optionally_use_neon) {
567 sources += gypi_skia_opts.neon_sources 567 sources += gypi_skia_opts.neon_sources
568 568
569 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 569 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
570 # when running this. 570 # when running this.
571 if (!arm_use_neon) { 571 if (!arm_use_neon) {
572 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 572 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
573 cflags += [ "-mfpu=neon" ] 573 cflags += [ "-mfpu=neon" ]
574 } 574 }
575 } 575 }
576 } else { 576 } else {
577 sources = gypi_skia_opts.none_sourcees 577 sources = gypi_skia_opts.none_sourcees
578 } 578 }
579 } else if (cpu_arch == "mipsel") { 579 } else if (current_cpu == "mipsel") {
580 cflags += [ "-fomit-frame-pointer" ] 580 cflags += [ "-fomit-frame-pointer" ]
581 sources = gypi_skia_opts.none_sources 581 sources = gypi_skia_opts.none_sources
582 } else { 582 } else {
583 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 583 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
584 } 584 }
585 585
586 if (is_android && !is_debug) { 586 if (is_android && !is_debug) {
587 configs -= [ "//build/config/compiler:optimize" ] 587 configs -= [ "//build/config/compiler:optimize" ]
588 configs += [ "//build/config/compiler:optimize_max" ] 588 configs += [ "//build/config/compiler:optimize_max" ]
589 } 589 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 622
623 deps = [ 623 deps = [
624 ":skia", 624 ":skia",
625 "//base", 625 "//base",
626 "//base/test:run_all_unittests", 626 "//base/test:run_all_unittests",
627 "//testing/gtest", 627 "//testing/gtest",
628 "//ui/gfx", 628 "//ui/gfx",
629 "//ui/gfx/geometry", 629 "//ui/gfx/geometry",
630 ] 630 ]
631 } 631 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698