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

Side by Side Diff: skia/BUILD.gn

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 9 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 | « shell/android/library_loader.cc ('k') | skia/config/SkUserConfig.h » ('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 (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 chromium. 15 # The list of Skia defines that are to be set for chromium.
16 gypi_skia_defines = 16 gypi_skia_defines =
17 exec_script("//build/gypi_to_gn.py", 17 exec_script("//build/gypi_to_gn.py",
18 [ 18 [
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (is_mac) { 171 if (is_mac) {
172 include_dirs += [ "//third_party/skia/include/utils/ios" ] 172 include_dirs += [ "//third_party/skia/include/utils/ios" ]
173 } 173 }
174 174
175 defines = [] 175 defines = []
176 176
177 if (component_mode == "shared_library") { 177 if (component_mode == "shared_library") {
178 defines += [ "SKIA_IMPLEMENTATION=1" ] 178 defines += [ "SKIA_IMPLEMENTATION=1" ]
179 } 179 }
180 180
181 if (cpu_arch == "arm") { 181 if (current_cpu == "arm") {
182 if (arm_use_neon) { 182 if (arm_use_neon) {
183 defines += [ "SK_ARM_HAS_NEON" ] 183 defines += [ "SK_ARM_HAS_NEON" ]
184 } 184 }
185 if (arm_optionally_use_neon) { 185 if (arm_optionally_use_neon) {
186 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ] 186 defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ]
187 } 187 }
188 } 188 }
189 189
190 # Settings for text blitting, chosen to approximate the system browser. 190 # Settings for text blitting, chosen to approximate the system browser.
191 if (is_linux) { 191 if (is_linux) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 "ext/skia_utils_win.cc", 291 "ext/skia_utils_win.cc",
292 "ext/skia_utils_win.h", 292 "ext/skia_utils_win.h",
293 ] 293 ]
294 294
295 # The skia gypi values are relative to the skia_dir, so we need to rebase. 295 # The skia gypi values are relative to the skia_dir, so we need to rebase.
296 sources += gypi_skia_core.sources 296 sources += gypi_skia_core.sources
297 sources += gypi_skia_effects.sources 297 sources += gypi_skia_effects.sources
298 sources += gypi_skia_utils.sources 298 sources += gypi_skia_utils.sources
299 sources += gypi_values.skia_library_sources 299 sources += gypi_values.skia_library_sources
300 300
301 if (cpu_arch == "arm") { 301 # This and skia_opts are really the same conceptual target so share headers.
302 allow_circular_includes_from = [ ":skia_opts" ]
303
304 if (current_cpu == "arm") {
302 sources += [ 305 sources += [
303 "//third_party/skia/src/core/SkUtilsArm.cpp", 306 "//third_party/skia/src/core/SkUtilsArm.cpp",
304 "//third_party/skia/src/core/SkUtilsArm.h", 307 "//third_party/skia/src/core/SkUtilsArm.h",
305 ] 308 ]
306 } 309 }
307 310
308 # GPU 311 # GPU
309 if (skia_support_gpu) { 312 if (skia_support_gpu) {
310 sources += gypi_skia_gpu.skgpu_sources 313 sources += gypi_skia_gpu.skgpu_sources
311 sources += gypi_skia_gpu.skgpu_null_gl_sources 314 sources += gypi_skia_gpu.skgpu_null_gl_sources
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 configs -= [ "//build/config/compiler:optimize" ] 528 configs -= [ "//build/config/compiler:optimize" ]
526 configs += [ "//build/config/compiler:optimize_max" ] 529 configs += [ "//build/config/compiler:optimize_max" ]
527 } 530 }
528 } 531 }
529 532
530 # Separated out so it can be compiled with different flags for SSE. 533 # Separated out so it can be compiled with different flags for SSE.
531 source_set("skia_opts") { 534 source_set("skia_opts") {
532 cflags = [] 535 cflags = []
533 defines = [] 536 defines = []
534 537
535 if (cpu_arch == "x86" || cpu_arch == "x64") { 538 if (current_cpu == "x86" || current_cpu == "x64") {
536 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + 539 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
537 gypi_skia_opts.sse41_sources + 540 gypi_skia_opts.sse41_sources +
538 [ 541 [
539 # Chrome-specific. 542 # Chrome-specific.
540 "ext/convolver_SSE2.cc", 543 "ext/convolver_SSE2.cc",
541 ] 544 ]
542 545
543 if (is_linux || is_mac) { 546 if (is_linux || is_mac) {
544 cflags += [ "-msse4.1" ] 547 cflags += [ "-msse4.1" ]
545 } 548 }
546 } else if (cpu_arch == "arm") { 549 } else if (current_cpu == "arm") {
547 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 550 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
548 # ARM), the compiler doesn't like that. 551 # ARM), the compiler doesn't like that.
549 cflags += [ "-fomit-frame-pointer" ] 552 cflags += [ "-fomit-frame-pointer" ]
550 553
551 if (arm_version >= 7) { 554 if (arm_version >= 7) {
552 sources = gypi_skia_opts.armv7_sources 555 sources = gypi_skia_opts.armv7_sources
553 if (arm_use_neon || arm_optionally_use_neon) { 556 if (arm_use_neon || arm_optionally_use_neon) {
554 sources += gypi_skia_opts.neon_sources 557 sources += gypi_skia_opts.neon_sources
555 558
556 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 559 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
557 # when running this. 560 # when running this.
558 if (!arm_use_neon) { 561 if (!arm_use_neon) {
559 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 562 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
560 cflags += [ "-mfpu=neon" ] 563 cflags += [ "-mfpu=neon" ]
561 } 564 }
562 } 565 }
563 } else { 566 } else {
564 sources = gypi_skia_opts.none_sourcees 567 sources = gypi_skia_opts.none_sourcees
565 } 568 }
566 } else if (cpu_arch == "mipsel") { 569 } else if (current_cpu == "mipsel") {
567 cflags += [ "-fomit-frame-pointer" ] 570 cflags += [ "-fomit-frame-pointer" ]
568 sources = gypi_skia_opts.none_sources 571 sources = gypi_skia_opts.none_sources
569 } else { 572 } else {
570 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 573 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
571 } 574 }
572 575
573 if (is_android && !is_debug) { 576 if (is_android && !is_debug) {
574 configs -= [ "//build/config/compiler:optimize" ] 577 configs -= [ "//build/config/compiler:optimize" ]
575 configs += [ "//build/config/compiler:optimize_max" ] 578 configs += [ "//build/config/compiler:optimize_max" ]
576 } 579 }
(...skipping 27 matching lines...) Expand all
604 ] 607 ]
605 608
606 if (!is_win && !is_mac) { 609 if (!is_win && !is_mac) {
607 sources -= [ "ext/platform_canvas_unittest.cc" ] 610 sources -= [ "ext/platform_canvas_unittest.cc" ]
608 } 611 }
609 612
610 deps = [ 613 deps = [
611 ":skia", 614 ":skia",
612 "//base", 615 "//base",
613 "//base/test:run_all_unittests", 616 "//base/test:run_all_unittests",
617 "//cc:test_support", # TODO: Fix this test to not depend on cc.
614 "//testing/gtest", 618 "//testing/gtest",
615 "//ui/gfx", 619 "//ui/gfx",
616 "//ui/gfx/geometry", 620 "//ui/gfx/geometry",
617 ] 621 ]
618 } 622 }
OLDNEW
« no previous file with comments | « shell/android/library_loader.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698