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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 */ | 81 */ |
82 #if !defined(SkNO_RETURN_HINT) | 82 #if !defined(SkNO_RETURN_HINT) |
83 # if SK_HAS_COMPILER_FEATURE(attribute_analyzer_noreturn) | 83 # if SK_HAS_COMPILER_FEATURE(attribute_analyzer_noreturn) |
84 static inline void SkNO_RETURN_HINT() __attribute__((analyzer_noreturn)); | 84 static inline void SkNO_RETURN_HINT() __attribute__((analyzer_noreturn)); |
85 static inline void SkNO_RETURN_HINT() {} | 85 static inline void SkNO_RETURN_HINT() {} |
86 # else | 86 # else |
87 # define SkNO_RETURN_HINT() do {} while (false) | 87 # define SkNO_RETURN_HINT() do {} while (false) |
88 # endif | 88 # endif |
89 #endif | 89 #endif |
90 | 90 |
91 #if defined(SK_ZLIB_INCLUDE) && defined(SK_SYSTEM_ZLIB) | |
92 # error "cannot define both SK_ZLIB_INCLUDE and SK_SYSTEM_ZLIB" | |
93 #elif defined(SK_ZLIB_INCLUDE) || defined(SK_SYSTEM_ZLIB) | |
94 # define SK_HAS_ZLIB | |
95 #endif | |
96 | |
97 /////////////////////////////////////////////////////////////////////////////// | 91 /////////////////////////////////////////////////////////////////////////////// |
98 | 92 |
99 #ifndef SkNEW | 93 #ifndef SkNEW |
100 # define SkNEW(type_name) (new type_name) | 94 # define SkNEW(type_name) (new type_name) |
101 # define SkNEW_ARGS(type_name, args) (new type_name args) | 95 # define SkNEW_ARGS(type_name, args) (new type_name args) |
102 # define SkNEW_ARRAY(type_name, count) (new type_name[(count)]) | 96 # define SkNEW_ARRAY(type_name, count) (new type_name[(count)]) |
103 # define SkNEW_PLACEMENT(buf, type_name) (new (buf) type_name) | 97 # define SkNEW_PLACEMENT(buf, type_name) (new (buf) type_name) |
104 # define SkNEW_PLACEMENT_ARGS(buf, type_name, args) (new (buf) type_name args) | 98 # define SkNEW_PLACEMENT_ARGS(buf, type_name, args) (new (buf) type_name args) |
105 # define SkDELETE(obj) (delete (obj)) | 99 # define SkDELETE(obj) (delete (obj)) |
106 # define SkDELETE_ARRAY(array) (delete[] (array)) | 100 # define SkDELETE_ARRAY(array) (delete[] (array)) |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 391 |
398 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB) | 392 #if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB) |
399 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB" | 393 # error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB" |
400 #elif defined(SK_GAMMA_SRGB) | 394 #elif defined(SK_GAMMA_SRGB) |
401 # define SK_GAMMA_EXPONENT (0.0f) | 395 # define SK_GAMMA_EXPONENT (0.0f) |
402 #elif !defined(SK_GAMMA_EXPONENT) | 396 #elif !defined(SK_GAMMA_EXPONENT) |
403 # define SK_GAMMA_EXPONENT (2.2f) | 397 # define SK_GAMMA_EXPONENT (2.2f) |
404 #endif | 398 #endif |
405 | 399 |
406 #endif // SkPostConfig_DEFINED | 400 #endif // SkPostConfig_DEFINED |
OLD | NEW |