| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 | 5 |
| 6 # This gyp file contains the platform-specific optimizations for Skia | 6 # This gyp file contains the platform-specific optimizations for Skia |
| 7 { | 7 { |
| 8 'targets': [ | 8 'targets': [ |
| 9 # Due to an unfortunate intersection of lameness between gcc and gyp, | 9 # Due to an unfortunate intersection of lameness between gcc and gyp, |
| 10 # we have to build the *_SSE2.cpp files in a separate target. The | 10 # we have to build the *_SSE2.cpp files in a separate target. The |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 'target_name': 'skia_opts', | 28 'target_name': 'skia_opts', |
| 29 'type': 'static_library', | 29 'type': 'static_library', |
| 30 'includes': [ | 30 'includes': [ |
| 31 'skia_common.gypi', | 31 'skia_common.gypi', |
| 32 ], | 32 ], |
| 33 'include_dirs': [ | 33 'include_dirs': [ |
| 34 '../third_party/skia/include/core', | 34 '../third_party/skia/include/core', |
| 35 '../third_party/skia/include/effects', | 35 '../third_party/skia/include/effects', |
| 36 '../third_party/skia/src/core', | 36 '../third_party/skia/src/core', |
| 37 '../third_party/skia/src/opts', | 37 '../third_party/skia/src/opts', |
| 38 '../third_party/skia/src/utils', |
| 38 ], | 39 ], |
| 39 'conditions': [ | 40 'conditions': [ |
| 40 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ | 41 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ |
| 41 target_arch != "arm" and target_arch != "arm64" and \ | 42 target_arch != "arm" and target_arch != "arm64" and \ |
| 42 target_arch != "mipsel"', { | 43 target_arch != "mipsel"', { |
| 43 'cflags': [ | 44 'cflags': [ |
| 44 '-msse2', | 45 '-msse2', |
| 45 ], | 46 ], |
| 46 }], | 47 }], |
| 47 [ 'target_arch != "arm" and target_arch != "mipsel" and \ | 48 [ 'target_arch != "arm" and target_arch != "mipsel" and \ |
| 48 target_arch != "arm64"', { | 49 target_arch != "arm64"', { |
| 49 'sources': [ | 50 'sources': [ |
| 51 '../third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp', |
| 50 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp', | 52 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp', |
| 51 '../third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp', | 53 '../third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp', |
| 52 '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', | 54 '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', |
| 55 '../third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp', |
| 56 '../third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp', |
| 57 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', |
| 53 '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp', | 58 '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp', |
| 54 '../third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp', | 59 '../third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp', |
| 55 '../third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp', | |
| 56 '../third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp', | |
| 57 '../third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp', | |
| 58 ], | 60 ], |
| 59 'dependencies': [ | 61 'dependencies': [ |
| 60 'skia_opts_ssse3', | 62 'skia_opts_ssse3', |
| 61 'skia_opts_sse4', | 63 'skia_opts_sse4', |
| 62 ], | 64 ], |
| 63 }], | 65 }], |
| 64 [ 'target_arch == "arm"', { | 66 [ 'target_arch == "arm"', { |
| 65 'conditions': [ | 67 'conditions': [ |
| 66 [ 'arm_version >= 7 and arm_neon == 1', { | 68 [ 'arm_version >= 7 and arm_neon == 1', { |
| 67 'defines': [ | 69 'defines': [ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 }], | 106 }], |
| 105 [ 'target_arch == "arm" and (arm_version < 7 or (arm_neon == 0 and arm_n
eon_optional == 1))', { | 107 [ 'target_arch == "arm" and (arm_version < 7 or (arm_neon == 0 and arm_n
eon_optional == 1))', { |
| 106 'sources': [ | 108 'sources': [ |
| 107 '../third_party/skia/src/opts/memset.arm.S', | 109 '../third_party/skia/src/opts/memset.arm.S', |
| 108 ], | 110 ], |
| 109 }], | 111 }], |
| 110 [ 'target_arch == "arm" and arm_version < 6', { | 112 [ 'target_arch == "arm" and arm_version < 6', { |
| 111 'sources': [ | 113 'sources': [ |
| 112 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 114 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
| 113 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 115 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
| 116 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', |
| 117 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', |
| 118 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', |
| 114 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 119 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
| 115 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 120 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
| 116 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
| 117 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
| 118 ], | 121 ], |
| 119 }], | 122 }], |
| 120 [ 'target_arch == "arm" and arm_version >= 6', { | 123 [ 'target_arch == "arm" and arm_version >= 6', { |
| 121 'sources': [ | 124 'sources': [ |
| 122 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', | 125 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', |
| 123 '../third_party/skia/src/opts/SkBlitRow_opts_arm.cpp', | 126 '../third_party/skia/src/opts/SkBlitRow_opts_arm.cpp', |
| 124 '../third_party/skia/src/opts/SkBlitRow_opts_arm.h', | 127 '../third_party/skia/src/opts/SkBlitRow_opts_arm.h', |
| 125 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', | 128 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', |
| 126 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', | 129 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', |
| 130 '../third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp', |
| 127 '../third_party/skia/src/opts/SkUtils_opts_arm.cpp', | 131 '../third_party/skia/src/opts/SkUtils_opts_arm.cpp', |
| 128 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 132 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
| 129 ], | 133 ], |
| 130 }], | 134 }], |
| 131 [ 'target_arch == "mipsel"',{ | 135 [ 'target_arch == "mipsel"',{ |
| 132 'cflags': [ | 136 'cflags': [ |
| 133 '-fomit-frame-pointer', | 137 '-fomit-frame-pointer', |
| 134 ], | 138 ], |
| 135 'sources': [ | 139 'sources': [ |
| 136 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', | 140 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', |
| 137 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 141 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
| 138 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 142 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
| 143 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', |
| 144 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', |
| 145 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', |
| 139 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 146 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
| 140 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 147 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
| 141 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
| 142 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
| 143 ], | 148 ], |
| 144 }], | 149 }], |
| 145 [ 'target_arch == "arm64"', { | 150 [ 'target_arch == "arm64"', { |
| 146 'sources': [ | 151 'sources': [ |
| 147 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', | 152 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', |
| 148 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
', | 153 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
', |
| 149 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', | 154 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', |
| 150 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', | 155 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', |
| 151 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', | 156 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', |
| 152 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 157 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
| 153 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', | 158 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', |
| 154 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', | 159 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', |
| 155 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', | 160 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', |
| 156 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', | 161 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', |
| 162 '../third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp', |
| 163 '../third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp', |
| 157 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 164 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
| 158 '../third_party/skia/src/opts/SkXfermode_opts_arm.cpp', | 165 '../third_party/skia/src/opts/SkXfermode_opts_arm.cpp', |
| 159 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | 166 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', |
| 160 ], | 167 ], |
| 161 }], | 168 }], |
| 162 ], | 169 ], |
| 163 }, | 170 }, |
| 164 # For the same lame reasons as what is done for skia_opts, we have to | 171 # For the same lame reasons as what is done for skia_opts, we have to |
| 165 # create another target specifically for SSSE3 code as we would not want | 172 # create another target specifically for SSSE3 code as we would not want |
| 166 # to compile the SSE2 code with -mssse3 which would potentially allow | 173 # to compile the SSE2 code with -mssse3 which would potentially allow |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 { | 255 { |
| 249 'target_name': 'skia_opts_none', | 256 'target_name': 'skia_opts_none', |
| 250 'type': 'static_library', | 257 'type': 'static_library', |
| 251 'includes': [ | 258 'includes': [ |
| 252 'skia_common.gypi', | 259 'skia_common.gypi', |
| 253 ], | 260 ], |
| 254 'include_dirs': [ | 261 'include_dirs': [ |
| 255 '../third_party/skia/include/core', | 262 '../third_party/skia/include/core', |
| 256 '../third_party/skia/include/effects', | 263 '../third_party/skia/include/effects', |
| 257 '../third_party/skia/src/core', | 264 '../third_party/skia/src/core', |
| 265 '../third_party/skia/src/utils', |
| 258 ], | 266 ], |
| 259 'sources': [ | 267 'sources': [ |
| 260 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', | 268 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', |
| 261 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 269 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
| 262 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 270 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
| 271 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', |
| 272 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', |
| 273 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', |
| 263 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 274 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
| 264 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 275 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
| 265 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
| 266 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
| 267 ], | 276 ], |
| 268 }, | 277 }, |
| 269 ], | 278 ], |
| 270 'conditions': [ | 279 'conditions': [ |
| 271 # NEON code must be compiled with -mfpu=neon which also affects scalar | 280 # NEON code must be compiled with -mfpu=neon which also affects scalar |
| 272 # code. To support dynamic NEON code paths, we need to build all | 281 # code. To support dynamic NEON code paths, we need to build all |
| 273 # NEON-specific sources in a separate static library. The situation | 282 # NEON-specific sources in a separate static library. The situation |
| 274 # is very similar to the SSSE3 one. | 283 # is very similar to the SSSE3 one. |
| 275 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { | 284 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { |
| 276 'targets': [ | 285 'targets': [ |
| 277 { | 286 { |
| 278 'target_name': 'skia_opts_neon', | 287 'target_name': 'skia_opts_neon', |
| 279 'type': 'static_library', | 288 'type': 'static_library', |
| 280 'includes': [ | 289 'includes': [ |
| 281 'skia_common.gypi', | 290 'skia_common.gypi', |
| 282 ], | 291 ], |
| 283 'include_dirs': [ | 292 'include_dirs': [ |
| 284 '../third_party/skia/include/core', | 293 '../third_party/skia/include/core', |
| 285 '../third_party/skia/include/effects', | 294 '../third_party/skia/include/effects', |
| 286 '../third_party/skia/src/core', | 295 '../third_party/skia/src/core', |
| 287 '../third_party/skia/src/opts', | 296 '../third_party/skia/src/opts', |
| 297 '../third_party/skia/src/utils', |
| 288 ], | 298 ], |
| 289 'cflags!': [ | 299 'cflags!': [ |
| 290 '-fno-omit-frame-pointer', | 300 '-fno-omit-frame-pointer', |
| 291 '-mfpu=vfp', # remove them all, just in case. | 301 '-mfpu=vfp', # remove them all, just in case. |
| 292 '-mfpu=vfpv3', | 302 '-mfpu=vfpv3', |
| 293 '-mfpu=vfpv3-d16', | 303 '-mfpu=vfpv3-d16', |
| 294 ], | 304 ], |
| 295 'cflags': [ | 305 'cflags': [ |
| 296 '-mfpu=neon', | 306 '-mfpu=neon', |
| 297 '-fomit-frame-pointer', | 307 '-fomit-frame-pointer', |
| 298 ], | 308 ], |
| 299 'ldflags': [ | 309 'ldflags': [ |
| 300 '-march=armv7-a', | 310 '-march=armv7-a', |
| 301 '-Wl,--fix-cortex-a8', | 311 '-Wl,--fix-cortex-a8', |
| 302 ], | 312 ], |
| 303 'sources': [ | 313 'sources': [ |
| 304 '../third_party/skia/src/opts/memset16_neon.S', | |
| 305 '../third_party/skia/src/opts/memset32_neon.S', | |
| 306 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', | 314 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', |
| 307 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
', | 315 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
', |
| 308 '../third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h'
, | 316 '../third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h'
, |
| 309 '../third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h
', | 317 '../third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h
', |
| 310 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', | 318 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', |
| 311 '../third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp', | 319 '../third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp', |
| 312 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | |
| 313 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', | 320 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', |
| 314 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', | 321 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', |
| 322 '../third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp', |
| 323 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', |
| 324 '../third_party/skia/src/opts/memset16_neon.S', |
| 325 '../third_party/skia/src/opts/memset32_neon.S', |
| 315 ], | 326 ], |
| 316 'conditions': [ | 327 'conditions': [ |
| 317 ['arm_neon == 1', { | 328 ['arm_neon == 1', { |
| 318 'defines': [ | 329 'defines': [ |
| 319 '__ARM_HAVE_NEON', | 330 '__ARM_HAVE_NEON', |
| 320 ], | 331 ], |
| 321 }], | 332 }], |
| 322 ['arm_neon_optional == 1', { | 333 ['arm_neon_optional == 1', { |
| 323 'defines': [ | 334 'defines': [ |
| 324 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', | 335 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', |
| 325 ], | 336 ], |
| 326 }], | 337 }], |
| 327 ], | 338 ], |
| 328 }, | 339 }, |
| 329 ], | 340 ], |
| 330 }], | 341 }], |
| 331 ], | 342 ], |
| 332 } | 343 } |
| OLD | NEW |