OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkPostConfig_DEFINED | 8 #ifndef SkPostConfig_DEFINED |
9 #define SkPostConfig_DEFINED | 9 #define SkPostConfig_DEFINED |
10 | 10 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 # | 147 # |
148 # ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED | 148 # ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED |
149 # undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED | 149 # undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED |
150 # undef WIN32_LEAN_AND_MEAN | 150 # undef WIN32_LEAN_AND_MEAN |
151 # endif | 151 # endif |
152 # ifdef NOMINMAX_WAS_LOCALLY_DEFINED | 152 # ifdef NOMINMAX_WAS_LOCALLY_DEFINED |
153 # undef NOMINMAX_WAS_LOCALLY_DEFINED | 153 # undef NOMINMAX_WAS_LOCALLY_DEFINED |
154 # undef NOMINMAX | 154 # undef NOMINMAX |
155 # endif | 155 # endif |
156 # | 156 # |
157 # ifndef SK_ALWAYSBREAK | 157 # ifndef SK_DEBUGBREAK |
158 # define SK_ALWAYSBREAK(p) do { if (!(p)) { SkNO_RETURN_HINT(); __debugbreak(
); }} while (false) | 158 # define SK_DEBUGBREAK(p) do { if (!(p)) { SkNO_RETURN_HINT(); __debugbreak()
; }} while (false) |
159 # endif | 159 # endif |
160 # | 160 # |
161 # ifndef SK_A32_SHIFT | 161 # ifndef SK_A32_SHIFT |
162 # define SK_A32_SHIFT 24 | 162 # define SK_A32_SHIFT 24 |
163 # define SK_R32_SHIFT 16 | 163 # define SK_R32_SHIFT 16 |
164 # define SK_G32_SHIFT 8 | 164 # define SK_G32_SHIFT 8 |
165 # define SK_B32_SHIFT 0 | 165 # define SK_B32_SHIFT 0 |
166 # endif | 166 # endif |
167 # | 167 # |
168 #else | 168 #else |
169 # ifndef SK_ALWAYSBREAK | 169 # ifndef SK_DEBUGBREAK |
170 # ifdef SK_DEBUG | 170 # ifdef SK_DEBUG |
171 # include <stdio.h> | 171 # include <stdio.h> |
172 # define SK_ALWAYSBREAK(cond) do { if (cond) break; \ | 172 # define SK_DEBUGBREAK(cond) do { if (cond) break; \ |
173 SkDebugf("%s:%d: failed assertion \"%s\"\n", \ | 173 SkDebugf("%s:%d: failed assertion \"%s\"\n", \ |
174 __FILE__, __LINE__, #cond); SK_CRASH(); } while (false) | 174 __FILE__, __LINE__, #cond); SK_CRASH(); } while (false) |
175 # else | 175 # else |
176 # define SK_ALWAYSBREAK(cond) do { if (cond) break; SK_CRASH(); } while (fa
lse) | 176 # define SK_DEBUGBREAK(cond) do { if (cond) break; SK_CRASH(); } while (fal
se) |
177 # endif | 177 # endif |
178 # endif | 178 # endif |
179 #endif | 179 #endif |
180 | 180 |
181 /** | 181 /** |
182 * We check to see if the SHIFT value has already been defined. | 182 * We check to see if the SHIFT value has already been defined. |
183 * if not, we define it ourself to some default values. We default to OpenGL | 183 * if not, we define it ourself to some default values. We default to OpenGL |
184 * order (in memory: r,g,b,a) | 184 * order (in memory: r,g,b,a) |
185 */ | 185 */ |
186 #ifndef SK_A32_SHIFT | 186 #ifndef SK_A32_SHIFT |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB) | 407 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB) |
408 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB" | 408 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB" |
409 #elif defined(SK_GAMMA_SRGB) | 409 #elif defined(SK_GAMMA_SRGB) |
410 # define SK_GAMMA_EXPONENT (0.0f) | 410 # define SK_GAMMA_EXPONENT (0.0f) |
411 #elif !defined(SK_GAMMA_EXPONENT) | 411 #elif !defined(SK_GAMMA_EXPONENT) |
412 # define SK_GAMMA_EXPONENT (2.2f) | 412 # define SK_GAMMA_EXPONENT (2.2f) |
413 #endif | 413 #endif |
414 | 414 |
415 #endif // SkPostConfig_DEFINED | 415 #endif // SkPostConfig_DEFINED |
OLD | NEW |