| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPostConfig_DEFINED | 8 #ifndef SkPostConfig_DEFINED |
| 9 #define SkPostConfig_DEFINED | 9 #define SkPostConfig_DEFINED |
| 10 | 10 |
| 11 #if defined(SK_BUILD_FOR_WIN32) || defined(SK_BUILD_FOR_WINCE) | 11 #if defined(SK_BUILD_FOR_WIN32) || defined(SK_BUILD_FOR_WINCE) |
| 12 # define SK_BUILD_FOR_WIN | 12 # define SK_BUILD_FOR_WIN |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #if defined(SK_DEBUG) && defined(SK_RELEASE) | 15 #if defined(SK_DEBUG) && defined(SK_RELEASE) |
| 16 # error "cannot define both SK_DEBUG and SK_RELEASE" | 16 # error "cannot define both SK_DEBUG and SK_RELEASE" |
| 17 #elif !defined(SK_DEBUG) && !defined(SK_RELEASE) | 17 #elif !defined(SK_DEBUG) && !defined(SK_RELEASE) |
| 18 # error "must define either SK_DEBUG or SK_RELEASE" | 18 # error "must define either SK_DEBUG or SK_RELEASE" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 #if defined(SK_SUPPORT_UNITTEST) && !defined(SK_DEBUG) | 21 #if defined(SK_SUPPORT_UNITTEST) && !defined(SK_DEBUG) |
| 22 # error "can't have unittests without debug" | 22 # error "can't have unittests without debug" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Matrix calculations may be float or double. | 26 * Matrix calculations may be float or double. |
| 27 * The default is double, as that is faster given our impl uses doubles | 27 * The default is float, as that's what Chromium's using. |
| 28 * for intermediate calculations. | |
| 29 */ | 28 */ |
| 30 #if defined(SK_MSCALAR_IS_DOUBLE) && defined(SK_MSCALAR_IS_FLOAT) | 29 #if defined(SK_MSCALAR_IS_DOUBLE) && defined(SK_MSCALAR_IS_FLOAT) |
| 31 # error "cannot define both SK_MSCALAR_IS_DOUBLE and SK_MSCALAR_IS_FLOAT" | 30 # error "cannot define both SK_MSCALAR_IS_DOUBLE and SK_MSCALAR_IS_FLOAT" |
| 32 #elif !defined(SK_MSCALAR_IS_DOUBLE) && !defined(SK_MSCALAR_IS_FLOAT) | 31 #elif !defined(SK_MSCALAR_IS_DOUBLE) && !defined(SK_MSCALAR_IS_FLOAT) |
| 33 # define SK_MSCALAR_IS_DOUBLE | 32 # define SK_MSCALAR_IS_FLOAT |
| 34 #endif | 33 #endif |
| 35 | 34 |
| 36 #if defined(SK_CPU_LENDIAN) && defined(SK_CPU_BENDIAN) | 35 #if defined(SK_CPU_LENDIAN) && defined(SK_CPU_BENDIAN) |
| 37 # error "cannot define both SK_CPU_LENDIAN and SK_CPU_BENDIAN" | 36 # error "cannot define both SK_CPU_LENDIAN and SK_CPU_BENDIAN" |
| 38 #elif !defined(SK_CPU_LENDIAN) && !defined(SK_CPU_BENDIAN) | 37 #elif !defined(SK_CPU_LENDIAN) && !defined(SK_CPU_BENDIAN) |
| 39 # error "must define either SK_CPU_LENDIAN or SK_CPU_BENDIAN" | 38 # error "must define either SK_CPU_LENDIAN or SK_CPU_BENDIAN" |
| 40 #endif | 39 #endif |
| 41 | 40 |
| 42 /** | 41 /** |
| 43 * Ensure the port has defined all of SK_X32_SHIFT, or none of them. | 42 * Ensure the port has defined all of SK_X32_SHIFT, or none of them. |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 # define SK_GAMMA_EXPONENT (2.2f) | 370 # define SK_GAMMA_EXPONENT (2.2f) |
| 372 #endif | 371 #endif |
| 373 | 372 |
| 374 ////////////////////////////////////////////////////////////////////// | 373 ////////////////////////////////////////////////////////////////////// |
| 375 | 374 |
| 376 #ifndef GR_TEST_UTILS | 375 #ifndef GR_TEST_UTILS |
| 377 # define GR_TEST_UTILS 1 | 376 # define GR_TEST_UTILS 1 |
| 378 #endif | 377 #endif |
| 379 | 378 |
| 380 #endif // SkPostConfig_DEFINED | 379 #endif // SkPostConfig_DEFINED |
| OLD | NEW |