OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 The Android Open Source Project | 2 * Copyright (C) 2006 The Android Open Source Project |
3 * | 3 * |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | 4 * Licensed under the Apache License, Version 2.0 (the "License"); |
5 * you may not use this file except in compliance with the License. | 5 * you may not use this file except in compliance with the License. |
6 * You may obtain a copy of the License at | 6 * You may obtain a copy of the License at |
7 * | 7 * |
8 * http://www.apache.org/licenses/LICENSE-2.0 | 8 * http://www.apache.org/licenses/LICENSE-2.0 |
9 * | 9 * |
10 * Unless required by applicable law or agreed to in writing, software | 10 * Unless required by applicable law or agreed to in writing, software |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 //#define SK_SCALAR_IS_FIXED | 52 //#define SK_SCALAR_IS_FIXED |
53 | 53 |
54 | 54 |
55 /* Somewhat independent of how SkScalar is implemented, Skia also wants to know | 55 /* Somewhat independent of how SkScalar is implemented, Skia also wants to know |
56 if it can use floats at all. Naturally, if SK_SCALAR_IS_FLOAT is defined, | 56 if it can use floats at all. Naturally, if SK_SCALAR_IS_FLOAT is defined, |
57 then so muse SK_CAN_USE_FLOAT, but if scalars are fixed, SK_CAN_USE_FLOAT | 57 then so muse SK_CAN_USE_FLOAT, but if scalars are fixed, SK_CAN_USE_FLOAT |
58 can go either way. | 58 can go either way. |
59 */ | 59 */ |
60 //#define SK_CAN_USE_FLOAT | 60 //#define SK_CAN_USE_FLOAT |
61 | 61 |
| 62 /* Temporarily turn on SK_USE_FLOATBITS so critical float->int conversions in S
kia |
| 63 are done with saturation. |
| 64 TODO(wjmaclean@chromium.org): Remove this once saturating float->int impleme
nted |
| 65 throughout Skia. |
| 66 */ |
| 67 #define SK_USE_FLOATBITS |
| 68 |
62 /* For some performance-critical scalar operations, skia will optionally work | 69 /* For some performance-critical scalar operations, skia will optionally work |
63 around the standard float operators if it knows that the CPU does not have | 70 around the standard float operators if it knows that the CPU does not have |
64 native support for floats. If your environment uses software floating point, | 71 native support for floats. If your environment uses software floating point, |
65 define this flag. | 72 define this flag. |
66 */ | 73 */ |
67 //#define SK_SOFTWARE_FLOAT | 74 //#define SK_SOFTWARE_FLOAT |
68 | 75 |
69 | 76 |
70 /* Skia has lots of debug-only code. Often this is just null checks or other | 77 /* Skia has lots of debug-only code. Often this is just null checks or other |
71 parameter checking, but sometimes it can be quite intrusive (e.g. check that | 78 parameter checking, but sometimes it can be quite intrusive (e.g. check that |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 #endif | 196 #endif |
190 | 197 |
191 // The default crash macro writes to badbeef which can cause some strange | 198 // The default crash macro writes to badbeef which can cause some strange |
192 // problems. Instead, pipe this through to the logging function as a fatal | 199 // problems. Instead, pipe this through to the logging function as a fatal |
193 // assertion. | 200 // assertion. |
194 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") | 201 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") |
195 | 202 |
196 // ===== End Chrome-specific definitions ===== | 203 // ===== End Chrome-specific definitions ===== |
197 | 204 |
198 #endif | 205 #endif |
OLD | NEW |