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 | |
154 // For Linux we want to match the most common X visual, which is | 148 // For Linux we want to match the most common X visual, which is |
155 // ARGB (in registers) | 149 // ARGB (in registers) |
156 #define SK_A32_SHIFT 24 | 150 #define SK_A32_SHIFT 24 |
157 #define SK_R32_SHIFT 16 | 151 #define SK_R32_SHIFT 16 |
158 #define SK_G32_SHIFT 8 | 152 #define SK_G32_SHIFT 8 |
159 #define SK_B32_SHIFT 0 | 153 #define SK_B32_SHIFT 0 |
160 #endif | |
161 | 154 |
162 #endif | 155 #endif |
163 | 156 |
164 // The default crash macro writes to badbeef which can cause some strange | 157 // The default crash macro writes to badbeef which can cause some strange |
165 // problems. Instead, pipe this through to the logging function as a fatal | 158 // problems. Instead, pipe this through to the logging function as a fatal |
166 // assertion. | 159 // assertion. |
167 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") | 160 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") |
168 | 161 |
169 // TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing | 162 // TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing |
170 // some of our transparency handling which generates purposely-invalid colors, | 163 // some of our transparency handling which generates purposely-invalid colors, |
171 // in turn causing assertions. | 164 // in turn causing assertions. |
172 //#ifndef NDEBUG | 165 //#ifndef NDEBUG |
173 // #define SK_DEBUG | 166 // #define SK_DEBUG |
174 // #undef SK_RELEASE | 167 // #undef SK_RELEASE |
175 #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since | 168 #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since |
176 // we've disabled assertions. When we re-enable | 169 // we've disabled assertions. When we re-enable |
177 // them, this line can be removed. | 170 // them, this line can be removed. |
178 //#else | 171 //#else |
179 #define SK_RELEASE | 172 #define SK_RELEASE |
180 #undef SK_DEBUG | 173 #undef SK_DEBUG |
181 //#endif | 174 //#endif |
182 | 175 |
183 // ===== End Chrome-specific definitions ===== | 176 // ===== End Chrome-specific definitions ===== |
184 | 177 |
185 #endif | 178 #endif |
OLD | NEW |