| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 SkClampRange_DEFINED | 8 #ifndef SkClampRange_DEFINED |
| 9 #define SkClampRange_DEFINED | 9 #define SkClampRange_DEFINED |
| 10 | 10 |
| 11 #include "SkFixed.h" | 11 #include "SkFixed.h" |
| 12 #include "SkScalar.h" | 12 #include "SkScalar.h" |
| 13 | 13 |
| 14 #define SK_SUPPORT_LEGACY_GRADIENT_PRECISION | |
| 15 | |
| 16 #ifdef SK_SUPPORT_LEGACY_GRADIENT_PRECISION | 14 #ifdef SK_SUPPORT_LEGACY_GRADIENT_PRECISION |
| 17 #define SkGradFixed SkFixed | 15 #define SkGradFixed SkFixed |
| 18 #define SkScalarToGradFixed SkScalarToFixed | 16 #define SkScalarToGradFixed SkScalarToFixed |
| 19 #define SkFixedToGradFixed(x) (x) | 17 #define SkFixedToGradFixed(x) (x) |
| 20 #define SkGradFixedToFixed(x) (x) | 18 #define SkGradFixedToFixed(x) (x) |
| 21 #define kFracMax_SkGradFixed 0xFFFF | 19 #define kFracMax_SkGradFixed 0xFFFF |
| 22 #else | 20 #else |
| 23 #define SkGradFixed SkFixed3232 | 21 #define SkGradFixed SkFixed3232 |
| 24 #define SkScalarToGradFixed SkScalarToFixed3232 | 22 #define SkScalarToGradFixed SkScalarToFixed3232 |
| 25 #define SkFixedToGradFixed SkFixedToFixed3232 | 23 #define SkFixedToGradFixed SkFixedToFixed3232 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 43 // only valid if fCount1 > 0 | 41 // only valid if fCount1 > 0 |
| 44 int fV0, fV1; | 42 int fV0, fV1; |
| 45 | 43 |
| 46 void init(SkGradFixed fx, SkGradFixed dx, int count, int v0, int v1); | 44 void init(SkGradFixed fx, SkGradFixed dx, int count, int v0, int v1); |
| 47 | 45 |
| 48 private: | 46 private: |
| 49 void initFor1(SkGradFixed fx); | 47 void initFor1(SkGradFixed fx); |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 #endif | 50 #endif |
| OLD | NEW |