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