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

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: cleanup / review 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 # this flag forces Skia not to use typographic metrics with GDI. 214 # this flag forces Skia not to use typographic metrics with GDI.
215 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS", 215 "SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS",
216 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", 216 "SK_USE_DISCARDABLE_SCALEDIMAGECACHE",
217 ] 217 ]
218 218
219 if (component_mode == "shared_library") { 219 if (component_mode == "shared_library") {
220 defines += [ "SKIA_IMPLEMENTATION=1" ] 220 defines += [ "SKIA_IMPLEMENTATION=1" ]
221 } 221 }
222 222
223 if (cpu_arch == "arm") { 223 if (current_cpu == "arm") {
224 if (arm_use_neon) { 224 if (arm_use_neon) {
225 defines += [ "SK_ARM_HAS_NEON" ] 225 defines += [ "SK_ARM_HAS_NEON" ]
226 } 226 }
227 if (arm_optionally_use_neon) { 227 if (arm_optionally_use_neon) {
228 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ] 228 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ]
229 } 229 }
230 } 230 }
231 231
232 # Settings for text blitting, chosen to approximate the system browser. 232 # Settings for text blitting, chosen to approximate the system browser.
233 if (is_linux) { 233 if (is_linux) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 "ext/skia_utils_win.cc", 333 "ext/skia_utils_win.cc",
334 "ext/skia_utils_win.h", 334 "ext/skia_utils_win.h",
335 ] 335 ]
336 336
337 # The skia gypi values are relative to the skia_dir, so we need to rebase. 337 # The skia gypi values are relative to the skia_dir, so we need to rebase.
338 sources += gypi_skia_core.sources 338 sources += gypi_skia_core.sources
339 sources += gypi_skia_effects.sources 339 sources += gypi_skia_effects.sources
340 sources += gypi_skia_utils.sources 340 sources += gypi_skia_utils.sources
341 sources += gypi_values.skia_library_sources 341 sources += gypi_values.skia_library_sources
342 342
343 if (cpu_arch == "arm") { 343 if (current_cpu == "arm") {
344 sources += [ 344 sources += [
345 "//third_party/skia/src/core/SkUtilsArm.cpp", 345 "//third_party/skia/src/core/SkUtilsArm.cpp",
346 "//third_party/skia/src/core/SkUtilsArm.h", 346 "//third_party/skia/src/core/SkUtilsArm.h",
347 ] 347 ]
348 } 348 }
349 349
350 # GPU 350 # GPU
351 if (skia_support_gpu) { 351 if (skia_support_gpu) {
352 sources += gypi_skia_gpu.skgpu_sources 352 sources += gypi_skia_gpu.skgpu_sources
353 sources += gypi_skia_gpu.skgpu_null_gl_sources 353 sources += gypi_skia_gpu.skgpu_null_gl_sources
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 configs -= [ "//build/config/compiler:optimize" ] 567 configs -= [ "//build/config/compiler:optimize" ]
568 configs += [ "//build/config/compiler:optimize_max" ] 568 configs += [ "//build/config/compiler:optimize_max" ]
569 } 569 }
570 } 570 }
571 571
572 # Separated out so it can be compiled with different flags for SSE. 572 # Separated out so it can be compiled with different flags for SSE.
573 source_set("skia_opts") { 573 source_set("skia_opts") {
574 cflags = [] 574 cflags = []
575 defines = [] 575 defines = []
576 576
577 if (cpu_arch == "x86" || cpu_arch == "x64") { 577 if (current_cpu == "x86" || current_cpu == "x64") {
578 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + 578 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
579 gypi_skia_opts.sse41_sources + 579 gypi_skia_opts.sse41_sources +
580 [ 580 [
581 # Chrome-specific. 581 # Chrome-specific.
582 "ext/convolver_SSE2.cc", 582 "ext/convolver_SSE2.cc",
583 ] 583 ]
584 584
585 if (is_linux || is_mac) { 585 if (is_linux || is_mac) {
586 cflags += [ "-msse4.1" ] 586 cflags += [ "-msse4.1" ]
587 } 587 }
588 } else if (cpu_arch == "arm") { 588 } else if (current_cpu == "arm") {
589 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 589 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
590 # ARM), the compiler doesn't like that. 590 # ARM), the compiler doesn't like that.
591 cflags += [ "-fomit-frame-pointer" ] 591 cflags += [ "-fomit-frame-pointer" ]
592 592
593 if (arm_version >= 7) { 593 if (arm_version >= 7) {
594 sources = gypi_skia_opts.armv7_sources 594 sources = gypi_skia_opts.armv7_sources
595 if (arm_use_neon || arm_optionally_use_neon) { 595 if (arm_use_neon || arm_optionally_use_neon) {
596 sources += gypi_skia_opts.neon_sources 596 sources += gypi_skia_opts.neon_sources
597 597
598 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 598 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
599 # when running this. 599 # when running this.
600 if (!arm_use_neon) { 600 if (!arm_use_neon) {
601 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 601 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
602 cflags += [ "-mfpu=neon" ] 602 cflags += [ "-mfpu=neon" ]
603 } 603 }
604 } 604 }
605 } else { 605 } else {
606 sources = gypi_skia_opts.none_sourcees 606 sources = gypi_skia_opts.none_sourcees
607 } 607 }
608 } else if (cpu_arch == "mipsel") { 608 } else if (current_cpu == "mipsel") {
609 cflags += [ "-fomit-frame-pointer" ] 609 cflags += [ "-fomit-frame-pointer" ]
610 sources = gypi_skia_opts.none_sources 610 sources = gypi_skia_opts.none_sources
611 } else { 611 } else {
612 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 612 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
613 } 613 }
614 614
615 if (is_android && !is_debug) { 615 if (is_android && !is_debug) {
616 configs -= [ "//build/config/compiler:optimize" ] 616 configs -= [ "//build/config/compiler:optimize" ]
617 configs += [ "//build/config/compiler:optimize_max" ] 617 configs += [ "//build/config/compiler:optimize_max" ]
618 } 618 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 651
652 deps = [ 652 deps = [
653 ":skia", 653 ":skia",
654 "//base", 654 "//base",
655 "//base/test:run_all_unittests", 655 "//base/test:run_all_unittests",
656 "//testing/gtest", 656 "//testing/gtest",
657 "//ui/gfx", 657 "//ui/gfx",
658 "//ui/gfx/geometry", 658 "//ui/gfx/geometry",
659 ] 659 ]
660 } 660 }
OLDNEW
« ppapi/BUILD.gn ('K') | « sandbox/win/BUILD.gn ('k') | third_party/adobe/flash/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698