| OLD | NEW | 
|    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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  408     configs += [ |  408     configs += [ | 
|  409       "//build/config/linux:fontconfig", |  409       "//build/config/linux:fontconfig", | 
|  410       "//build/config/linux:freetype2", |  410       "//build/config/linux:freetype2", | 
|  411       "//build/config/linux:pangocairo", |  411       "//build/config/linux:pangocairo", | 
|  412     ] |  412     ] | 
|  413     deps += [ |  413     deps += [ | 
|  414       "//third_party/icu:icuuc", |  414       "//third_party/icu:icuuc", | 
|  415     ] |  415     ] | 
|  416   } |  416   } | 
|  417  |  417  | 
 |  418   if (is_android) { | 
 |  419     deps += [ | 
 |  420       "//third_party/expat", | 
 |  421       "//third_party/freetype", | 
 |  422     ] | 
 |  423   } | 
 |  424  | 
|  418   if (skia_support_pdf) { |  425   if (skia_support_pdf) { | 
|  419     deps += [ "//third_party/sfntly" ] |  426     deps += [ "//third_party/sfntly" ] | 
|  420   } |  427   } | 
|  421 } |  428 } | 
|  422  |  429  | 
|  423 # Separated out so it can be compiled with different flags for SSE. |  430 # Separated out so it can be compiled with different flags for SSE. | 
|  424 source_set("skia_opts") { |  431 source_set("skia_opts") { | 
 |  432   cflags = [] | 
 |  433   defines = [] | 
 |  434  | 
|  425   if (cpu_arch == "x86" || cpu_arch == "x64") { |  435   if (cpu_arch == "x86" || cpu_arch == "x64") { | 
|  426     sources = [ |  436     sources = [ | 
|  427       # SSE 2 |  437       # SSE 2 | 
|  428       "//third_party/skia/src/opts/opts_check_x86.cpp", |  438       "//third_party/skia/src/opts/opts_check_x86.cpp", | 
|  429       "//third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp", |  439       "//third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp", | 
|  430       "//third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp", |  440       "//third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp", | 
|  431       "//third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp", |  441       "//third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp", | 
|  432       "//third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp", |  442       "//third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp", | 
|  433       "//third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp", |  443       "//third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp", | 
|  434       "//third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp", |  444       "//third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp", | 
|  435       "//third_party/skia/src/opts/SkUtils_opts_SSE2.cpp", |  445       "//third_party/skia/src/opts/SkUtils_opts_SSE2.cpp", | 
|  436       "//third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp", |  446       "//third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp", | 
|  437  |  447  | 
|  438       # SSE 3 |  448       # SSE 3 | 
|  439       "//third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp", |  449       "//third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp", | 
|  440  |  450  | 
|  441       # Chrome-specific. |  451       # Chrome-specific. | 
|  442       "ext/convolver_SSE2.cc", |  452       "ext/convolver_SSE2.cc", | 
|  443  |  453  | 
|  444       # These are header files used by this target from the skia one above. |  454       # These are header files used by this target from the skia one above. | 
|  445       "ext/convolver.h", |  455       "ext/convolver.h", | 
|  446       "//third_party/skia/include/core/SkTypes.h", |  456       "//third_party/skia/include/core/SkTypes.h", | 
|  447     ] |  457     ] | 
|  448  |  458  | 
|  449     if (is_linux || is_mac) { |  459     if (is_linux || is_mac) { | 
|  450       cflags = [ "-mssse3" ]  # Note third 's'. |  460       cflags += [ "-mssse3" ]  # Note third 's'. | 
|  451     } |  461     } | 
 |  462   } else if (cpu_arch == "arm") { | 
 |  463     sources = [ | 
 |  464       "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", | 
 |  465     ] | 
 |  466  | 
 |  467     # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 
 |  468     # ARM), the compiler doesn't like that. | 
 |  469     cflags += [ "-fomit-frame-pointer" ] | 
 |  470  | 
 |  471     if (arm_version >= 7) { | 
 |  472       if (arm_use_neon || arm_optionally_use_neon) { | 
 |  473         sources += [ | 
 |  474           "//third_party/skia/src/opts/memset16_neon.S", | 
 |  475           "//third_party/skia/src/opts/memset32_neon.S", | 
 |  476           "//third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp", | 
 |  477           "//third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp", | 
 |  478           "//third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h", | 
 |  479           "//third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h", | 
 |  480           "//third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp", | 
 |  481           "//third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp", | 
 |  482           "//third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp", | 
 |  483           "//third_party/skia/src/opts/SkBlurImage_opts_neon.cpp", | 
 |  484           "//third_party/skia/src/opts/SkMorphology_opts_neon.cpp", | 
 |  485         ] | 
 |  486  | 
 |  487         cflags += [ | 
 |  488           # The neon assembly contains conditional instructions which aren't | 
 |  489           # enclosed in an IT block. The assembler complains without this | 
 |  490           # option. See #86592. | 
 |  491           "-Wa,-mimplicit-it=always", | 
 |  492         ] | 
 |  493  | 
 |  494         # Root build config sets -mfpu=$arm_fpu, which we expect to be neon | 
 |  495         # when running this. | 
 |  496         assert(arm_fpu == "neon") | 
 |  497  | 
 |  498         #ldflags = [ | 
 |  499         #  "-march=armv7-a", | 
 |  500         #  "-Wl,--fix-cortex-a8", | 
 |  501         #] | 
 |  502       } | 
 |  503  | 
 |  504       if (arm_use_neon) { | 
 |  505         defines += [ "__ARM_HAVE_NEON" ] | 
 |  506       } | 
 |  507       if (arm_optionally_use_neon) { | 
 |  508         defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ] | 
 |  509       } | 
 |  510     } | 
 |  511  | 
 |  512     # Non-Neon ARM code. | 
 |  513     if (arm_version < 7 || (!arm_use_neon && arm_optionally_use_neon)) { | 
 |  514       sources += [ "//third_party/skia/src/opts/memset.arm.S" ] | 
 |  515     } | 
 |  516  | 
 |  517     if (arm_version < 6) { | 
 |  518       sources += [ | 
 |  519         "//third_party/skia/src/opts/SkBlitMask_opts_none.cpp", | 
 |  520         "//third_party/skia/src/opts/SkBlitRow_opts_none.cpp", | 
 |  521         "//third_party/skia/src/opts/SkUtils_opts_none.cpp", | 
 |  522         "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", | 
 |  523         "//third_party/skia/src/opts/SkMorphology_opts_none.cpp", | 
 |  524         "//third_party/skia/src/opts/SkBlurImage_opts_none.cpp", | 
 |  525       ] | 
 |  526     } else { | 
 |  527       # arm version >= 6. | 
 |  528       sources += [ | 
 |  529         "//third_party/skia/src/opts/SkBlitMask_opts_arm.cpp", | 
 |  530         "//third_party/skia/src/opts/SkBlitRow_opts_arm.cpp", | 
 |  531         "//third_party/skia/src/opts/SkBlitRow_opts_arm.h", | 
 |  532         "//third_party/skia/src/opts/SkBlurImage_opts_arm.cpp", | 
 |  533         "//third_party/skia/src/opts/SkMorphology_opts_arm.cpp", | 
 |  534         "//third_party/skia/src/opts/SkUtils_opts_arm.cpp", | 
 |  535         "//third_party/skia/src/opts/SkXfermode_opts_none.cpp", | 
 |  536       ] | 
 |  537     } | 
 |  538  | 
 |  539  | 
|  452   } else { |  540   } else { | 
|  453     assert(false, "Need to port ARM/MIPS stuff from skia_library_opts.gyp") |  541     assert(false, "Need to port MIPS stuff from skia_library_opts.gyp") | 
|  454   } |  542   } | 
|  455  |  543  | 
|  456   configs -= [ "//build/config/compiler:chromium_code" ] |  544   configs -= [ "//build/config/compiler:chromium_code" ] | 
|  457   configs += [ |  545   configs += [ | 
|  458     ":skia_config", |  546     ":skia_config", | 
|  459     "//build/config/compiler:no_chromium_code" |  547     "//build/config/compiler:no_chromium_code" | 
|  460   ] |  548   ] | 
|  461  |  549  | 
|  462   deps = [ |  550   deps = [ | 
|  463     "//base", |  551     "//base", | 
|  464   ] |  552   ] | 
|  465  |  553  | 
|  466   visibility = ":skia" |  554   visibility = ":skia" | 
|  467 } |  555 } | 
| OLD | NEW |