| OLD | NEW |
| 1 # Gyp file for opts projects | 1 # Gyp file for opts projects |
| 2 { | 2 { |
| 3 'targets': [ | 3 'targets': [ |
| 4 # Due to an unfortunate intersection of lameness between gcc and gyp, | 4 # Due to an unfortunate intersection of lameness between gcc and gyp, |
| 5 # we have to build the *_SSE2.cpp files in a separate target. The | 5 # we have to build the *_SSE2.cpp files in a separate target. The |
| 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
| 7 # must be passed the -msse2 flag. However, with this flag, it may | 7 # must be passed the -msse2 flag. However, with this flag, it may |
| 8 # emit SSE2 instructions even for scalar code, such as the CPUID | 8 # emit SSE2 instructions even for scalar code, such as the CPUID |
| 9 # test used to test for the presence of SSE2. So that, and all other | 9 # test used to test for the presence of SSE2. So that, and all other |
| 10 # code must be compiled *without* -msse2. The gyp lameness is that it | 10 # code must be compiled *without* -msse2. The gyp lameness is that it |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 'product_name': 'skia_opts', | 24 'product_name': 'skia_opts', |
| 25 'type': 'static_library', | 25 'type': 'static_library', |
| 26 'standalone_static_library': 1, | 26 'standalone_static_library': 1, |
| 27 'dependencies': [ | 27 'dependencies': [ |
| 28 'core.gyp:*', | 28 'core.gyp:*', |
| 29 'effects.gyp:*' | 29 'effects.gyp:*' |
| 30 ], | 30 ], |
| 31 'include_dirs': [ | 31 'include_dirs': [ |
| 32 '../src/core', | 32 '../src/core', |
| 33 '../src/opts', | 33 '../src/opts', |
| 34 '../src/utils', | |
| 35 ], | 34 ], |
| 36 'conditions': [ | 35 'conditions': [ |
| 37 [ 'skia_arch_type == "x86" and skia_os != "ios"', { | 36 [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
| 38 'conditions': [ | 37 'conditions': [ |
| 39 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { | 38 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { |
| 40 'cflags': [ | 39 'cflags': [ |
| 41 '-msse2', | 40 '-msse2', |
| 42 ], | 41 ], |
| 43 }], | 42 }], |
| 44 ], | 43 ], |
| 45 'include_dirs': [ | 44 'include_dirs': [ |
| 46 '../include/utils', | 45 '../include/utils', |
| 47 ], | 46 ], |
| 48 'dependencies': [ | 47 'dependencies': [ |
| 49 'opts_ssse3', | 48 'opts_ssse3', |
| 50 'opts_sse4', | 49 'opts_sse4', |
| 51 ], | 50 ], |
| 52 'sources': [ | 51 'sources': [ |
| 53 '../src/opts/opts_check_x86.cpp', | 52 '../src/opts/opts_check_x86.cpp', |
| 54 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', | 53 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', |
| 55 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', | 54 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', |
| 56 '../src/opts/SkBlitRow_opts_SSE2.cpp', | 55 '../src/opts/SkBlitRow_opts_SSE2.cpp', |
| 57 '../src/opts/SkBlitRect_opts_SSE2.cpp', | 56 '../src/opts/SkBlitRect_opts_SSE2.cpp', |
| 58 '../src/opts/SkBlurImage_opts_SSE2.cpp', | 57 '../src/opts/SkBlurImage_opts_SSE2.cpp', |
| 59 '../src/opts/SkMorphology_opts_SSE2.cpp', | 58 '../src/opts/SkMorphology_opts_SSE2.cpp', |
| 60 '../src/opts/SkTextureCompression_opts_none.cpp', | |
| 61 '../src/opts/SkUtils_opts_SSE2.cpp', | 59 '../src/opts/SkUtils_opts_SSE2.cpp', |
| 62 '../src/opts/SkXfermode_opts_SSE2.cpp', | 60 '../src/opts/SkXfermode_opts_SSE2.cpp', |
| 63 ], | 61 ], |
| 64 }], | 62 }], |
| 65 [ 'skia_arch_type == "arm" and arm_version >= 7', { | 63 [ 'skia_arch_type == "arm" and arm_version >= 7', { |
| 66 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 64 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
| 67 # ARM), the compiler doesn't like that. | 65 # ARM), the compiler doesn't like that. |
| 68 'cflags!': [ | 66 'cflags!': [ |
| 69 '-fno-omit-frame-pointer', | 67 '-fno-omit-frame-pointer', |
| 70 '-mapcs-frame', | 68 '-mapcs-frame', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ], | 100 ], |
| 103 }], | 101 }], |
| 104 ], | 102 ], |
| 105 }], | 103 }], |
| 106 [ 'skia_arch_type == "mips"', { | 104 [ 'skia_arch_type == "mips"', { |
| 107 'sources': [ | 105 'sources': [ |
| 108 '../src/opts/SkBlitMask_opts_none.cpp', | 106 '../src/opts/SkBlitMask_opts_none.cpp', |
| 109 '../src/opts/SkBlurImage_opts_none.cpp', | 107 '../src/opts/SkBlurImage_opts_none.cpp', |
| 110 '../src/opts/SkMorphology_opts_none.cpp', | 108 '../src/opts/SkMorphology_opts_none.cpp', |
| 111 '../src/opts/SkUtils_opts_none.cpp', | 109 '../src/opts/SkUtils_opts_none.cpp', |
| 112 '../src/opts/SkTextureCompression_opts_none.cpp', | |
| 113 '../src/opts/SkXfermode_opts_none.cpp', | 110 '../src/opts/SkXfermode_opts_none.cpp', |
| 114 ], | 111 ], |
| 115 'conditions': [ | 112 'conditions': [ |
| 116 [ '(mips_arch_variant == "mips32r2") \ | 113 [ '(mips_arch_variant == "mips32r2") \ |
| 117 and (mips_dsp == 1 or mips_dsp == 2)', { | 114 and (mips_dsp == 1 or mips_dsp == 2)', { |
| 118 'sources': [ | 115 'sources': [ |
| 119 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp', | 116 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp', |
| 120 '../src/opts/SkBlitRow_opts_mips_dsp.cpp', | 117 '../src/opts/SkBlitRow_opts_mips_dsp.cpp', |
| 121 ], | 118 ], |
| 122 }, { | 119 }, { |
| 123 'sources': [ | 120 'sources': [ |
| 124 '../src/opts/SkBitmapProcState_opts_none.cpp', | 121 '../src/opts/SkBitmapProcState_opts_none.cpp', |
| 125 '../src/opts/SkBlitRow_opts_none.cpp', | 122 '../src/opts/SkBlitRow_opts_none.cpp', |
| 126 ], | 123 ], |
| 127 }], | 124 }], |
| 128 ], | 125 ], |
| 129 }], | 126 }], |
| 130 [ '(skia_arch_type == "arm" and arm_version < 7) \ | 127 [ '(skia_arch_type == "arm" and arm_version < 7) \ |
| 131 or (skia_os == "ios") \ | 128 or (skia_os == "ios") \ |
| 132 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { | 129 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { |
| 133 'sources': [ | 130 'sources': [ |
| 134 '../src/opts/SkBitmapProcState_opts_none.cpp', | 131 '../src/opts/SkBitmapProcState_opts_none.cpp', |
| 135 '../src/opts/SkBlitMask_opts_none.cpp', | 132 '../src/opts/SkBlitMask_opts_none.cpp', |
| 136 '../src/opts/SkBlitRow_opts_none.cpp', | 133 '../src/opts/SkBlitRow_opts_none.cpp', |
| 137 '../src/opts/SkBlurImage_opts_none.cpp', | 134 '../src/opts/SkBlurImage_opts_none.cpp', |
| 138 '../src/opts/SkMorphology_opts_none.cpp', | 135 '../src/opts/SkMorphology_opts_none.cpp', |
| 139 '../src/opts/SkUtils_opts_none.cpp', | 136 '../src/opts/SkUtils_opts_none.cpp', |
| 140 '../src/opts/SkTextureCompression_opts_none.cpp', | |
| 141 '../src/opts/SkXfermode_opts_none.cpp', | 137 '../src/opts/SkXfermode_opts_none.cpp', |
| 142 ], | 138 ], |
| 143 }], | 139 }], |
| 144 [ 'skia_android_framework', { | 140 [ 'skia_android_framework', { |
| 145 'cflags!': [ | 141 'cflags!': [ |
| 146 '-msse2', | 142 '-msse2', |
| 147 '-mfpu=neon', | 143 '-mfpu=neon', |
| 148 '-fomit-frame-pointer', | 144 '-fomit-frame-pointer', |
| 149 '-mno-apcs-frame', | 145 '-mno-apcs-frame', |
| 150 ] | 146 ] |
| 151 }], | 147 }], |
| 152 [ 'skia_arch_type == "arm64"', { | 148 [ 'skia_arch_type == "arm64"', { |
| 153 'sources': [ | 149 'sources': [ |
| 154 '../src/opts/SkBitmapProcState_arm_neon.cpp', | 150 '../src/opts/SkBitmapProcState_arm_neon.cpp', |
| 155 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', | 151 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', |
| 156 '../src/opts/SkBitmapProcState_opts_arm.cpp', | 152 '../src/opts/SkBitmapProcState_opts_arm.cpp', |
| 157 '../src/opts/SkBlitMask_opts_arm.cpp', | 153 '../src/opts/SkBlitMask_opts_arm.cpp', |
| 158 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 154 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
| 159 '../src/opts/SkBlitRow_opts_arm.cpp', | 155 '../src/opts/SkBlitRow_opts_arm.cpp', |
| 160 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 156 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
| 161 '../src/opts/SkBlurImage_opts_arm.cpp', | 157 '../src/opts/SkBlurImage_opts_arm.cpp', |
| 162 '../src/opts/SkBlurImage_opts_neon.cpp', | 158 '../src/opts/SkBlurImage_opts_neon.cpp', |
| 163 '../src/opts/SkMorphology_opts_arm.cpp', | 159 '../src/opts/SkMorphology_opts_arm.cpp', |
| 164 '../src/opts/SkMorphology_opts_neon.cpp', | 160 '../src/opts/SkMorphology_opts_neon.cpp', |
| 165 '../src/opts/SkTextureCompression_opts_none.cpp', | |
| 166 '../src/opts/SkUtils_opts_none.cpp', | 161 '../src/opts/SkUtils_opts_none.cpp', |
| 167 '../src/opts/SkXfermode_opts_arm.cpp', | 162 '../src/opts/SkXfermode_opts_arm.cpp', |
| 168 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 163 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
| 169 ], | 164 ], |
| 170 }], | 165 }], |
| 171 ], | 166 ], |
| 172 }, | 167 }, |
| 173 # For the same lame reasons as what is done for skia_opts, we have to | 168 # For the same lame reasons as what is done for skia_opts, we have to |
| 174 # create another target specifically for SSSE3 code as we would not want | 169 # create another target specifically for SSSE3 code as we would not want |
| 175 # to compile the SSE2 code with -mssse3 which would potentially allow | 170 # to compile the SSE2 code with -mssse3 which would potentially allow |
| 176 # gcc to generate SSSE3 code. | 171 # gcc to generate SSSE3 code. |
| 177 { | 172 { |
| 178 'target_name': 'opts_ssse3', | 173 'target_name': 'opts_ssse3', |
| 179 'product_name': 'skia_opts_ssse3', | 174 'product_name': 'skia_opts_ssse3', |
| 180 'type': 'static_library', | 175 'type': 'static_library', |
| 181 'standalone_static_library': 1, | 176 'standalone_static_library': 1, |
| 182 'dependencies': [ | 177 'dependencies': [ |
| 183 'core.gyp:*', | 178 'core.gyp:*', |
| 184 'effects.gyp:*' | 179 'effects.gyp:*' |
| 185 ], | 180 ], |
| 186 'include_dirs': [ | 181 'include_dirs': [ |
| 187 '../src/core', | 182 '../src/core', |
| 188 '../src/utils', | |
| 189 ], | 183 ], |
| 190 'conditions': [ | 184 'conditions': [ |
| 191 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 185 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
| 192 and not skia_android_framework', { | 186 and not skia_android_framework', { |
| 193 'cflags': [ | 187 'cflags': [ |
| 194 '-mssse3', | 188 '-mssse3', |
| 195 ], | 189 ], |
| 196 }], | 190 }], |
| 197 # (Mac has -mssse3 globally.) | 191 # (Mac has -mssse3 globally.) |
| 198 [ 'skia_arch_type == "x86"', { | 192 [ 'skia_arch_type == "x86"', { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 210 'target_name': 'opts_sse4', | 204 'target_name': 'opts_sse4', |
| 211 'product_name': 'skia_opts_sse4', | 205 'product_name': 'skia_opts_sse4', |
| 212 'type': 'static_library', | 206 'type': 'static_library', |
| 213 'standalone_static_library': 1, | 207 'standalone_static_library': 1, |
| 214 'dependencies': [ | 208 'dependencies': [ |
| 215 'core.gyp:*', | 209 'core.gyp:*', |
| 216 'effects.gyp:*' | 210 'effects.gyp:*' |
| 217 ], | 211 ], |
| 218 'include_dirs': [ | 212 'include_dirs': [ |
| 219 '../src/core', | 213 '../src/core', |
| 220 '../src/utils', | |
| 221 ], | 214 ], |
| 222 'conditions': [ | 215 'conditions': [ |
| 223 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 216 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
| 224 and not skia_android_framework', { | 217 and not skia_android_framework', { |
| 225 'cflags': [ | 218 'cflags': [ |
| 226 '-msse4', | 219 '-msse4', |
| 227 ], | 220 ], |
| 228 }], | 221 }], |
| 229 [ 'skia_os == "mac"', { | 222 [ 'skia_os == "mac"', { |
| 230 'xcode_settings': { | 223 'xcode_settings': { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 'product_name': 'skia_opts_neon', | 257 'product_name': 'skia_opts_neon', |
| 265 'type': 'static_library', | 258 'type': 'static_library', |
| 266 'standalone_static_library': 1, | 259 'standalone_static_library': 1, |
| 267 'dependencies': [ | 260 'dependencies': [ |
| 268 'core.gyp:*', | 261 'core.gyp:*', |
| 269 'effects.gyp:*' | 262 'effects.gyp:*' |
| 270 ], | 263 ], |
| 271 'include_dirs': [ | 264 'include_dirs': [ |
| 272 '../src/core', | 265 '../src/core', |
| 273 '../src/opts', | 266 '../src/opts', |
| 274 '../src/utils', | |
| 275 ], | 267 ], |
| 276 'cflags!': [ | 268 'cflags!': [ |
| 277 '-fno-omit-frame-pointer', | 269 '-fno-omit-frame-pointer', |
| 278 '-mfpu=vfp', # remove them all, just in case. | 270 '-mfpu=vfp', # remove them all, just in case. |
| 279 '-mfpu=vfpv3', | 271 '-mfpu=vfpv3', |
| 280 '-mfpu=vfpv3-d16', | 272 '-mfpu=vfpv3-d16', |
| 281 ], | 273 ], |
| 282 'conditions': [ | 274 'conditions': [ |
| 283 [ 'not skia_android_framework', { | 275 [ 'not skia_android_framework', { |
| 284 'cflags': [ | 276 'cflags': [ |
| 285 '-mfpu=neon', | 277 '-mfpu=neon', |
| 286 '-fomit-frame-pointer', | 278 '-fomit-frame-pointer', |
| 287 ], | 279 ], |
| 288 }], | 280 }], |
| 289 ], | 281 ], |
| 290 'ldflags': [ | 282 'ldflags': [ |
| 291 '-march=armv7-a', | 283 '-march=armv7-a', |
| 292 '-Wl,--fix-cortex-a8', | 284 '-Wl,--fix-cortex-a8', |
| 293 ], | 285 ], |
| 294 'sources': [ | 286 'sources': [ |
| 295 '../src/opts/memset16_neon.S', | 287 '../src/opts/memset16_neon.S', |
| 296 '../src/opts/memset32_neon.S', | 288 '../src/opts/memset32_neon.S', |
| 297 '../src/opts/SkBitmapProcState_arm_neon.cpp', | 289 '../src/opts/SkBitmapProcState_arm_neon.cpp', |
| 298 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', | 290 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', |
| 299 '../src/opts/SkBitmapProcState_matrix_neon.h', | 291 '../src/opts/SkBitmapProcState_matrix_neon.h', |
| 300 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 292 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
| 301 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 293 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
| 302 '../src/opts/SkBlurImage_opts_neon.cpp', | 294 '../src/opts/SkBlurImage_opts_neon.cpp', |
| 303 '../src/opts/SkMorphology_opts_neon.cpp', | 295 '../src/opts/SkMorphology_opts_neon.cpp', |
| 304 '../src/opts/SkTextureCompression_opts_neon.cpp', | |
| 305 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 296 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
| 306 ], | 297 ], |
| 307 }, | 298 }, |
| 308 ], | 299 ], |
| 309 } | 300 } |
| OLD | NEW |