| epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 2 | /* |
| epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2010 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | |
| epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 10 | |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 11 | #ifndef GrScalar_DEFINED |
| 12 | #define GrScalar_DEFINED |
| 13 | |
| 14 | #include "GrTypes.h" |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 15 | #include "SkScalar.h" |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 16 | |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 17 | #define GR_Int32Min SK_NaN32 |
| 18 | #define GR_Int32Max SK_MaxS32 |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 19 | |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 20 | #define GR_Fixed1 SK_Fixed1 |
| 21 | #define GR_FixedHalf SK_FixedHalf |
| 22 | #define GrIntToFixed(a) SkIntToFixed(a) |
| 23 | #define GrFixedToFloat(a) SkFixedToFloat(a) |
| 24 | #define GrFixedFloorToInt(a) SkFixedFloor(a) |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 25 | |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 26 | #define GrScalar SkScalar |
| 27 | #define GR_Scalar1 SK_Scalar1 |
| 28 | #define GR_ScalarHalf SK_ScalarHalf |
| 29 | #define GR_ScalarMin SK_ScalarMin |
| 30 | #define GR_ScalarMax SK_ScalarMax |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 31 | |
| reed@google.com | 7744c20 | 2011-05-06 19:26:26 +0000 | [diff] [blame] | 32 | #define GrIntToScalar(a) SkIntToScalar(a) |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 33 | #define GrScalarHalf(a) SkScalarHalf(a) |
| 34 | #define GrScalarAve(a,b) SkScalarAve(a,b) |
| bsalomon@google.com | ee43512 | 2011-07-01 14:57:55 +0000 | [diff] [blame] | 35 | #define GrMul(a,b) SkScalarMul(a,b) // deprecated, prefer GrScalarMul |
| 36 | #define GrScalarMul(a,b) SkScalarMul(a,b) |
| bungeman@google.com | 8c5753e | 2011-05-20 19:11:50 +0000 | [diff] [blame] | 37 | #define GrScalarDiv(a,b) SkScalarDiv(a, b) |
| reed@google.com | 2e55012 | 2011-05-06 17:30:45 +0000 | [diff] [blame] | 38 | #define GrScalarToFloat(a) SkScalarToFloat(a) |
| 39 | #define GrFloatToScalar(a) SkScalarToFloat(a) |
| 40 | #define GrIntToScalar(a) SkIntToScalar(a) |
| 41 | #define GrScalarAbs(a) SkScalarAbs(a) |
| 42 | #define GrScalarIsInt(a) SkScalarIsInt(a) |
| 43 | #define GrScalarMax(a,b) SkScalarMax(a,b) |
| 44 | #define GrScalarFloorToInt(a) SkScalarFloor(a) |
| 45 | #define GrScalarCeilToInt(a) SkScalarCeil(a) |
| 46 | #define GrFixedToScalar(a) SkFixedToScalar(a) |
| reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 47 | |
| 48 | #endif |
| 49 | |