OLD | NEW |
1 /* include/corecg/SkUserConfig.h | 1 /* include/corecg/SkUserConfig.h |
2 ** | 2 ** |
3 ** Copyright 2006, Google Inc. | 3 ** Copyright 2006, Google Inc. |
4 ** | 4 ** |
5 ** Licensed under the Apache License, Version 2.0 (the "License"); | 5 ** Licensed under the Apache License, Version 2.0 (the "License"); |
6 ** you may not use this file except in compliance with the License. | 6 ** you may not use this file except in compliance with the License. |
7 ** You may obtain a copy of the License at | 7 ** You may obtain a copy of the License at |
8 ** | 8 ** |
9 ** http://www.apache.org/licenses/LICENSE-2.0 | 9 ** http://www.apache.org/licenses/LICENSE-2.0 |
10 ** | 10 ** |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Below we set the order for ARGB channels in registers. I suspect that, on | 138 // Below we set the order for ARGB channels in registers. I suspect that, on |
139 // big endian machines, you can keep this the same and everything will work. | 139 // big endian machines, you can keep this the same and everything will work. |
140 // The in-memory order will be different, of course, but as long as everything | 140 // The in-memory order will be different, of course, but as long as everything |
141 // is reading memory as words rather than bytes, it will all work. However, if | 141 // is reading memory as words rather than bytes, it will all work. However, if |
142 // you find that colours are messed up I thought that I would leave a helpful | 142 // you find that colours are messed up I thought that I would leave a helpful |
143 // locator for you. Also see the comments in | 143 // locator for you. Also see the comments in |
144 // base/gfx/bitmap_platform_device_linux.h | 144 // base/gfx/bitmap_platform_device_linux.h |
145 #error Read the comment at this location | 145 #error Read the comment at this location |
146 #endif | 146 #endif |
147 | 147 |
| 148 #ifdef LINUX2 |
| 149 #define SK_A32_SHIFT 24 |
| 150 #define SK_B32_SHIFT 16 |
| 151 #define SK_G32_SHIFT 8 |
| 152 #define SK_R32_SHIFT 0 |
| 153 #else |
148 // For Linux we want to match the most common X visual, which is | 154 // For Linux we want to match the most common X visual, which is |
149 // ARGB (in registers) | 155 // ARGB (in registers) |
150 #define SK_A32_SHIFT 24 | 156 #define SK_A32_SHIFT 24 |
151 #define SK_R32_SHIFT 16 | 157 #define SK_R32_SHIFT 16 |
152 #define SK_G32_SHIFT 8 | 158 #define SK_G32_SHIFT 8 |
153 #define SK_B32_SHIFT 0 | 159 #define SK_B32_SHIFT 0 |
| 160 #endif |
154 | 161 |
155 #endif | 162 #endif |
156 | 163 |
157 // The default crash macro writes to badbeef which can cause some strange | 164 // The default crash macro writes to badbeef which can cause some strange |
158 // problems. Instead, pipe this through to the logging function as a fatal | 165 // problems. Instead, pipe this through to the logging function as a fatal |
159 // assertion. | 166 // assertion. |
160 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") | 167 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") |
161 | 168 |
162 // TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing | 169 // TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing |
163 // some of our transparency handling which generates purposely-invalid colors, | 170 // some of our transparency handling which generates purposely-invalid colors, |
164 // in turn causing assertions. | 171 // in turn causing assertions. |
165 //#ifndef NDEBUG | 172 //#ifndef NDEBUG |
166 // #define SK_DEBUG | 173 // #define SK_DEBUG |
167 // #undef SK_RELEASE | 174 // #undef SK_RELEASE |
168 #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since | 175 #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since |
169 // we've disabled assertions. When we re-enable | 176 // we've disabled assertions. When we re-enable |
170 // them, this line can be removed. | 177 // them, this line can be removed. |
171 //#else | 178 //#else |
172 #define SK_RELEASE | 179 #define SK_RELEASE |
173 #undef SK_DEBUG | 180 #undef SK_DEBUG |
174 //#endif | 181 //#endif |
175 | 182 |
176 // ===== End Chrome-specific definitions ===== | 183 // ===== End Chrome-specific definitions ===== |
177 | 184 |
178 #endif | 185 #endif |
OLD | NEW |