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

Side by Side Diff: skia/BUILD.gn

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « services/surfaces/surfaces_scheduler.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 (current_cpu == "arm") { 8 if (cpu_arch == "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 (current_cpu == "arm") { 181 if (cpu_arch == "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 # This and skia_opts are really the same conceptual target so share headers. 301 if (cpu_arch == "arm") {
302 allow_circular_includes_from = [ ":skia_opts" ]
303
304 if (current_cpu == "arm") {
305 sources += [ 302 sources += [
306 "//third_party/skia/src/core/SkUtilsArm.cpp", 303 "//third_party/skia/src/core/SkUtilsArm.cpp",
307 "//third_party/skia/src/core/SkUtilsArm.h", 304 "//third_party/skia/src/core/SkUtilsArm.h",
308 ] 305 ]
309 } 306 }
310 307
311 # GPU 308 # GPU
312 if (skia_support_gpu) { 309 if (skia_support_gpu) {
313 sources += gypi_skia_gpu.skgpu_sources 310 sources += gypi_skia_gpu.skgpu_sources
314 sources += gypi_skia_gpu.skgpu_null_gl_sources 311 sources += gypi_skia_gpu.skgpu_null_gl_sources
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 configs -= [ "//build/config/compiler:optimize" ] 525 configs -= [ "//build/config/compiler:optimize" ]
529 configs += [ "//build/config/compiler:optimize_max" ] 526 configs += [ "//build/config/compiler:optimize_max" ]
530 } 527 }
531 } 528 }
532 529
533 # Separated out so it can be compiled with different flags for SSE. 530 # Separated out so it can be compiled with different flags for SSE.
534 source_set("skia_opts") { 531 source_set("skia_opts") {
535 cflags = [] 532 cflags = []
536 defines = [] 533 defines = []
537 534
538 if (current_cpu == "x86" || current_cpu == "x64") { 535 if (cpu_arch == "x86" || cpu_arch == "x64") {
539 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources + 536 sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
540 gypi_skia_opts.sse41_sources + 537 gypi_skia_opts.sse41_sources +
541 [ 538 [
542 # Chrome-specific. 539 # Chrome-specific.
543 "ext/convolver_SSE2.cc", 540 "ext/convolver_SSE2.cc",
544 ] 541 ]
545 542
546 if (is_linux || is_mac) { 543 if (is_linux || is_mac) {
547 cflags += [ "-msse4.1" ] 544 cflags += [ "-msse4.1" ]
548 } 545 }
549 } else if (current_cpu == "arm") { 546 } else if (cpu_arch == "arm") {
550 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 547 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
551 # ARM), the compiler doesn't like that. 548 # ARM), the compiler doesn't like that.
552 cflags += [ "-fomit-frame-pointer" ] 549 cflags += [ "-fomit-frame-pointer" ]
553 550
554 if (arm_version >= 7) { 551 if (arm_version >= 7) {
555 sources = gypi_skia_opts.armv7_sources 552 sources = gypi_skia_opts.armv7_sources
556 if (arm_use_neon || arm_optionally_use_neon) { 553 if (arm_use_neon || arm_optionally_use_neon) {
557 sources += gypi_skia_opts.neon_sources 554 sources += gypi_skia_opts.neon_sources
558 555
559 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon 556 # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
560 # when running this. 557 # when running this.
561 if (!arm_use_neon) { 558 if (!arm_use_neon) {
562 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 559 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
563 cflags += [ "-mfpu=neon" ] 560 cflags += [ "-mfpu=neon" ]
564 } 561 }
565 } 562 }
566 } else { 563 } else {
567 sources = gypi_skia_opts.none_sourcees 564 sources = gypi_skia_opts.none_sourcees
568 } 565 }
569 } else if (current_cpu == "mipsel") { 566 } else if (cpu_arch == "mipsel") {
570 cflags += [ "-fomit-frame-pointer" ] 567 cflags += [ "-fomit-frame-pointer" ]
571 sources = gypi_skia_opts.none_sources 568 sources = gypi_skia_opts.none_sources
572 } else { 569 } else {
573 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") 570 assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
574 } 571 }
575 572
576 if (is_android && !is_debug) { 573 if (is_android && !is_debug) {
577 configs -= [ "//build/config/compiler:optimize" ] 574 configs -= [ "//build/config/compiler:optimize" ]
578 configs += [ "//build/config/compiler:optimize_max" ] 575 configs += [ "//build/config/compiler:optimize_max" ]
579 } 576 }
(...skipping 27 matching lines...) Expand all
607 ] 604 ]
608 605
609 if (!is_win && !is_mac) { 606 if (!is_win && !is_mac) {
610 sources -= [ "ext/platform_canvas_unittest.cc" ] 607 sources -= [ "ext/platform_canvas_unittest.cc" ]
611 } 608 }
612 609
613 deps = [ 610 deps = [
614 ":skia", 611 ":skia",
615 "//base", 612 "//base",
616 "//base/test:run_all_unittests", 613 "//base/test:run_all_unittests",
617 "//cc:test_support", # TODO: Fix this test to not depend on cc.
618 "//testing/gtest", 614 "//testing/gtest",
619 "//ui/gfx", 615 "//ui/gfx",
620 "//ui/gfx/geometry", 616 "//ui/gfx/geometry",
621 ] 617 ]
622 } 618 }
OLDNEW
« no previous file with comments | « services/surfaces/surfaces_scheduler.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698