OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef SKIA_EXT_CONVOLVER_H_ | 5 #ifndef SKIA_EXT_CONVOLVER_H_ |
6 #define SKIA_EXT_CONVOLVER_H_ | 6 #define SKIA_EXT_CONVOLVER_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/cpu.h" | 12 #include "base/cpu.h" |
13 #include "third_party/skia/include/core/SkSize.h" | 13 #include "third_party/skia/include/core/SkSize.h" |
14 #include "third_party/skia/include/core/SkTypes.h" | 14 #include "third_party/skia/include/core/SkTypes.h" |
15 | 15 |
16 // We can build SSE2 optimized versions for all x86 CPUs | 16 // We can build SSE2 optimized versions for all x86 CPUs |
17 // except when building for the IOS emulator. | 17 // except when building for the IOS emulator. |
18 #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_IOS) | 18 #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_IOS) |
19 #define SIMD_SSE2 1 | 19 #define SIMD_SSE2 1 |
20 #define SIMD_PADDING 8 // 8 * int16 | 20 #define SIMD_PADDING 8 // 8 * int16 |
21 #endif | 21 #endif |
22 | 22 |
| 23 #if defined (ARCH_CPU_MIPS_FAMILY) && \ |
| 24 defined(__mips_dsp) && (__mips_dsp_rev >= 2) |
| 25 #define SIMD_MIPS_DSPR2 1 |
| 26 #endif |
23 // avoid confusion with Mac OS X's math library (Carbon) | 27 // avoid confusion with Mac OS X's math library (Carbon) |
24 #if defined(__APPLE__) | 28 #if defined(__APPLE__) |
25 #undef FloatToFixed | 29 #undef FloatToFixed |
26 #undef FixedToFloat | 30 #undef FixedToFloat |
27 #endif | 31 #endif |
28 | 32 |
29 namespace skia { | 33 namespace skia { |
30 | 34 |
31 // Represents a filter in one dimension. Each output pixel has one entry in this | 35 // Represents a filter in one dimension. Each output pixel has one entry in this |
32 // object for the filter values contributing to it. You build up the filter | 36 // object for the filter values contributing to it. You build up the filter |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 const SkISize& image_size, | 219 const SkISize& image_size, |
216 unsigned char* output, | 220 unsigned char* output, |
217 int output_byte_row_stride, | 221 int output_byte_row_stride, |
218 int output_channel_index, | 222 int output_channel_index, |
219 int output_channel_count, | 223 int output_channel_count, |
220 bool absolute_values); | 224 bool absolute_values); |
221 | 225 |
222 } // namespace skia | 226 } // namespace skia |
223 | 227 |
224 #endif // SKIA_EXT_CONVOLVER_H_ | 228 #endif // SKIA_EXT_CONVOLVER_H_ |
OLD | NEW |