#include "include/config/SkUserConfig.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
#define | SK_NOTHING_ARG1(arg1) |
|
#define | SK_NOTHING_ARG2(arg1, arg2) |
|
#define | SK_NOTHING_ARG3(arg1, arg2, arg3) |
|
#define | SK_BUILD_FOR_MAC |
|
#define | SK_RESTRICT __restrict__ |
|
#define | SK_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
#define | SK_CPU_LENDIAN |
|
#define | SK_CPU_SSE_LEVEL_SSE1 10 |
| SK_CPU_SSE_LEVEL. More...
|
|
#define | SK_CPU_SSE_LEVEL_SSE2 20 |
|
#define | SK_CPU_SSE_LEVEL_SSE3 30 |
|
#define | SK_CPU_SSE_LEVEL_SSSE3 31 |
|
#define | SK_CPU_SSE_LEVEL_SSE41 41 |
|
#define | SK_CPU_SSE_LEVEL_SSE42 42 |
|
#define | SK_CPU_SSE_LEVEL_AVX 51 |
|
#define | SK_CPU_SSE_LEVEL_AVX2 52 |
|
#define | SK_CPU_SSE_LEVEL_SKX 60 |
|
#define | SKIA_IMPLEMENTATION 0 |
|
#define | SK_API |
|
#define | SK_SPI SK_API |
|
#define | SK_DEBUG |
|
#define | SK_ATTRIBUTE(attr) |
|
#define | SK_SUPPORT_GPU 1 |
|
#define | SkUNREACHABLE __builtin_trap() |
|
#define | SK_DUMP_GOOGLE3_STACK() |
|
#define | SK_DUMP_LINE_FORMAT "%s:%d" |
|
#define | SK_ABORT(message, ...) |
|
#define | SK_R32_SHIFT 0 |
|
#define | SK_B32_SHIFT (16-SK_R32_SHIFT) |
|
#define | SK_G32_SHIFT 8 |
|
#define | SK_A32_SHIFT 24 |
|
#define | SK_PMCOLOR_BYTE_ORDER(C0, C1, C2, C3) |
| SK_PMCOLOR_BYTE_ORDER can be used to query the byte order of SkPMColor at compile time. More...
|
|
#define | SK_UNUSED SK_ATTRIBUTE(unused) |
|
#define | SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline |
| If your judgment is better than the compiler's (i.e. More...
|
|
#define | SK_NEVER_INLINE SK_ATTRIBUTE(noinline) |
| If your judgment is better than the compiler's (i.e. More...
|
|
#define | SK_PREFETCH(ptr) |
|
#define | SK_PRINTF_LIKE(A, B) |
|
#define | SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 |
|
#define | SK_GAMMA_EXPONENT (0.0f) |
|
#define | GR_TEST_UTILS 0 |
|
#define | SK_HISTOGRAMS_ENABLED 0 |
|
#define | SK_HISTOGRAM_BOOLEAN(name, sample) |
|
#define | SK_HISTOGRAM_ENUMERATION(name, sample, enum_size) |
|
#define | SK_HISTOGRAM_EXACT_LINEAR(name, sample, value_max) |
|
#define | SK_HISTOGRAM_MEMORY_KB(name, sample) |
|
#define | SK_HISTOGRAM_PERCENTAGE(name, percent_as_int) SK_HISTOGRAM_EXACT_LINEAR(name, percent_as_int, 101) |
|
#define | SK_ENABLE_LEGACY_SHADERCONTEXT |
|
#define | SK_API_AVAILABLE(...) |
|
#define | SkASSERT_RELEASE(cond) static_cast<void>( (cond) ? (void)0 : []{ SK_ABORT("assert(%s)", #cond); }() ) |
|
#define | SkASSERT(cond) SkASSERT_RELEASE(cond) |
|
#define | SkASSERTF(cond, fmt, ...) |
|
#define | SkDEBUGFAIL(message) SK_ABORT("%s", message) |
|
#define | SkDEBUGFAILF(fmt, ...) SK_ABORT(fmt, ##__VA_ARGS__) |
|
#define | SkDEBUGCODE(...) __VA_ARGS__ |
|
#define | SkDEBUGF(...) SkDebugf(__VA_ARGS__) |
|
#define | SkAssertResult(cond) SkASSERT(cond) |
|
#define | SK_ARRAY_COUNT(array) (sizeof(SkArrayCountHelper(array))) |
|
|
typedef unsigned | U8CPU |
| Fast type for unsigned 8 bits. More...
|
|
typedef unsigned | U16CPU |
| Fast type for unsigned 16 bits. More...
|
|
typedef uint32_t | SkFourByteTag |
|
typedef int32_t | SkUnichar |
| 32 bit integer to hold a unicode value More...
|
|
typedef uint16_t | SkGlyphID |
| 16 bit unsigned integer to hold a glyph index More...
|
|
typedef uint32_t | SkMSec |
| 32 bit value to hold a millisecond duration Note that SK_MSecMax is about 25 days. More...
|
|
|
SK_API void | sk_abort_no_print (void) |
| Called internally if we hit an unrecoverable error. More...
|
|
SK_API void | SkDebugf (const char format[],...) |
|
template<typename T > |
static constexpr bool | SkToBool (const T &x) |
|
static constexpr int32_t | SkLeftShift (int32_t value, int32_t shift) |
|
static constexpr int64_t | SkLeftShift (int64_t value, int32_t shift) |
|
template<typename T , size_t N> |
char(& | SkArrayCountHelper (T(&array)[N]))[N] |
|
template<typename T > |
static constexpr T | SkAlign2 (T x) |
|
template<typename T > |
static constexpr T | SkAlign4 (T x) |
|
template<typename T > |
static constexpr T | SkAlign8 (T x) |
|
template<typename T > |
static constexpr bool | SkIsAlign2 (T x) |
|
template<typename T > |
static constexpr bool | SkIsAlign4 (T x) |
|
template<typename T > |
static constexpr bool | SkIsAlign8 (T x) |
|
template<typename T > |
static constexpr T | SkAlignPtr (T x) |
|
template<typename T > |
static constexpr bool | SkIsAlignPtr (T x) |
|
static constexpr SkFourByteTag | SkSetFourByteTag (char a, char b, char c, char d) |
|
static int32_t | SkAbs32 (int32_t value) |
|
template<typename T > |
static T | SkTAbs (T value) |
|
◆ GR_TEST_UTILS
◆ SK_A32_SHIFT
◆ SK_ABORT
#define SK_ABORT |
( |
|
message, |
|
|
|
... |
|
) |
| |
Value: do { \
__FILE__, __LINE__, ##__VA_ARGS__); \
SK_DUMP_GOOGLE3_STACK(); \
sk_abort_no_print(); \
} while (false)
◆ SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 |
◆ SK_ALWAYS_INLINE
If your judgment is better than the compiler's (i.e.
you've profiled it), you can use SK_ALWAYS_INLINE to force inlining. E.g. inline void someMethod() { ... } // may not be inlined SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined
◆ SK_API
◆ SK_API_AVAILABLE
#define SK_API_AVAILABLE |
( |
|
... | ) |
|
◆ SK_ARRAY_COUNT
◆ SK_ATTRIBUTE
#define SK_ATTRIBUTE |
( |
|
attr | ) |
|
◆ SK_B32_SHIFT
◆ SK_BUILD_FOR_MAC
◆ SK_CPU_LENDIAN
◆ SK_CPU_SSE_LEVEL_AVX
#define SK_CPU_SSE_LEVEL_AVX 51 |
◆ SK_CPU_SSE_LEVEL_AVX2
#define SK_CPU_SSE_LEVEL_AVX2 52 |
◆ SK_CPU_SSE_LEVEL_SKX
#define SK_CPU_SSE_LEVEL_SKX 60 |
◆ SK_CPU_SSE_LEVEL_SSE1
#define SK_CPU_SSE_LEVEL_SSE1 10 |
SK_CPU_SSE_LEVEL.
If defined, SK_CPU_SSE_LEVEL should be set to the highest supported level. On non-intel CPU this should be undefined.
◆ SK_CPU_SSE_LEVEL_SSE2
#define SK_CPU_SSE_LEVEL_SSE2 20 |
◆ SK_CPU_SSE_LEVEL_SSE3
#define SK_CPU_SSE_LEVEL_SSE3 30 |
◆ SK_CPU_SSE_LEVEL_SSE41
#define SK_CPU_SSE_LEVEL_SSE41 41 |
◆ SK_CPU_SSE_LEVEL_SSE42
#define SK_CPU_SSE_LEVEL_SSE42 42 |
◆ SK_CPU_SSE_LEVEL_SSSE3
#define SK_CPU_SSE_LEVEL_SSSE3 31 |
◆ SK_DEBUG
◆ SK_DUMP_GOOGLE3_STACK
#define SK_DUMP_GOOGLE3_STACK |
( |
| ) |
|
◆ SK_DUMP_LINE_FORMAT
#define SK_DUMP_LINE_FORMAT "%s:%d" |
◆ SK_ENABLE_LEGACY_SHADERCONTEXT
#define SK_ENABLE_LEGACY_SHADERCONTEXT |
◆ SK_G32_SHIFT
◆ SK_GAMMA_EXPONENT
#define SK_GAMMA_EXPONENT (0.0f) |
◆ SK_HISTOGRAM_BOOLEAN
#define SK_HISTOGRAM_BOOLEAN |
( |
|
name, |
|
|
|
sample |
|
) |
| |
◆ SK_HISTOGRAM_ENUMERATION
#define SK_HISTOGRAM_ENUMERATION |
( |
|
name, |
|
|
|
sample, |
|
|
|
enum_size |
|
) |
| |
◆ SK_HISTOGRAM_EXACT_LINEAR
#define SK_HISTOGRAM_EXACT_LINEAR |
( |
|
name, |
|
|
|
sample, |
|
|
|
value_max |
|
) |
| |
◆ SK_HISTOGRAM_MEMORY_KB
#define SK_HISTOGRAM_MEMORY_KB |
( |
|
name, |
|
|
|
sample |
|
) |
| |
◆ SK_HISTOGRAM_PERCENTAGE
◆ SK_HISTOGRAMS_ENABLED
#define SK_HISTOGRAMS_ENABLED 0 |
◆ SK_NEVER_INLINE
If your judgment is better than the compiler's (i.e.
you've profiled it), you can use SK_NEVER_INLINE to prevent inlining.
◆ SK_NOTHING_ARG1
#define SK_NOTHING_ARG1 |
( |
|
arg1 | ) |
|
◆ SK_NOTHING_ARG2
#define SK_NOTHING_ARG2 |
( |
|
arg1, |
|
|
|
arg2 |
|
) |
| |
◆ SK_NOTHING_ARG3
#define SK_NOTHING_ARG3 |
( |
|
arg1, |
|
|
|
arg2, |
|
|
|
arg3 |
|
) |
| |
◆ SK_PMCOLOR_BYTE_ORDER
#define SK_PMCOLOR_BYTE_ORDER |
( |
|
C0, |
|
|
|
C1, |
|
|
|
C2, |
|
|
|
C3 |
|
) |
| |
Value: (SK_ ## C0 ## 32_SHIFT == 0 && \
SK_ ## C1 ## 32_SHIFT == 8 && \
SK_ ## C2 ## 32_SHIFT == 16 && \
SK_ ## C3 ## 32_SHIFT == 24)
SK_PMCOLOR_BYTE_ORDER can be used to query the byte order of SkPMColor at compile time.
◆ SK_PREFETCH
#define SK_PREFETCH |
( |
|
ptr | ) |
|
◆ SK_PRINTF_LIKE
#define SK_PRINTF_LIKE |
( |
|
A, |
|
|
|
B |
|
) |
| |
◆ SK_R32_SHIFT
◆ SK_RESTRICT
#define SK_RESTRICT __restrict__ |
◆ SK_SPI
◆ SK_SUPPORT_GPU
◆ SK_UNUSED
◆ SK_WARN_UNUSED_RESULT
#define SK_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
◆ SkASSERT
◆ SkASSERT_RELEASE
#define SkASSERT_RELEASE |
( |
|
cond | ) |
static_cast<void>( (cond) ? (void)0 : []{ SK_ABORT("assert(%s)", #cond); }() ) |
◆ SkASSERTF
#define SkASSERTF |
( |
|
cond, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: static_cast<void>( (cond) ? (void)0 : [&]{ \
SkDebugf(fmt"\n", ##__VA_ARGS__); \
SK_ABORT("assert(%s)", #cond); \
}() )
◆ SkAssertResult
#define SkAssertResult |
( |
|
cond | ) |
SkASSERT(cond) |
◆ SkDEBUGCODE
#define SkDEBUGCODE |
( |
|
... | ) |
__VA_ARGS__ |
◆ SkDEBUGF
#define SkDEBUGF |
( |
|
... | ) |
SkDebugf(__VA_ARGS__) |
◆ SkDEBUGFAIL
#define SkDEBUGFAIL |
( |
|
message | ) |
SK_ABORT("%s", message) |
◆ SkDEBUGFAILF
#define SkDEBUGFAILF |
( |
|
fmt, |
|
|
|
... |
|
) |
| SK_ABORT(fmt, ##__VA_ARGS__) |
◆ SKIA_IMPLEMENTATION
#define SKIA_IMPLEMENTATION 0 |
◆ SkUNREACHABLE
#define SkUNREACHABLE __builtin_trap() |
◆ SkFourByteTag
◆ SkGlyphID
16 bit unsigned integer to hold a glyph index
◆ SkMSec
32 bit value to hold a millisecond duration Note that SK_MSecMax is about 25 days.
◆ SkUnichar
32 bit integer to hold a unicode value
◆ U16CPU
Fast type for unsigned 16 bits.
Use for parameter passing and local variables, not for storage
◆ U8CPU
Fast type for unsigned 8 bits.
Use for parameter passing and local variables, not for storage
◆ SkBackingFit
Indicates whether a backing store needs to be an exact match or can be larger than is strictly necessary.
◆ SkBudgeted
Indicates whether an allocation should count against a cache budget.
◆ sk_abort_no_print()
SK_API void sk_abort_no_print |
( |
void |
| ) |
|
Called internally if we hit an unrecoverable error.
The platform implementation must not return, but should either throw an exception or otherwise exit.
◆ SkAbs32()
static int32_t SkAbs32 |
( |
int32_t |
value | ) |
|
|
inlinestatic |
◆ SkAlign2()
template<typename T >
static constexpr T SkAlign2 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkAlign4()
template<typename T >
static constexpr T SkAlign4 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkAlign8()
template<typename T >
static constexpr T SkAlign8 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkAlignPtr()
template<typename T >
static constexpr T SkAlignPtr |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkArrayCountHelper()
template<typename T , size_t N>
char(& SkArrayCountHelper |
( |
T(&) |
array[N] | ) |
)[N] |
- Returns
- the number of entries in an array (not a pointer)
◆ SkDebugf()
SK_API void SkDebugf |
( |
const char |
format[], |
|
|
|
... |
|
) |
| |
◆ SkIsAlign2()
template<typename T >
static constexpr bool SkIsAlign2 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkIsAlign4()
template<typename T >
static constexpr bool SkIsAlign4 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkIsAlign8()
template<typename T >
static constexpr bool SkIsAlign8 |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkIsAlignPtr()
template<typename T >
static constexpr bool SkIsAlignPtr |
( |
T |
x | ) |
|
|
staticconstexpr |
◆ SkLeftShift() [1/2]
static constexpr int32_t SkLeftShift |
( |
int32_t |
value, |
|
|
int32_t |
shift |
|
) |
| |
|
inlinestaticconstexpr |
◆ SkLeftShift() [2/2]
static constexpr int64_t SkLeftShift |
( |
int64_t |
value, |
|
|
int32_t |
shift |
|
) |
| |
|
inlinestaticconstexpr |
◆ SkSetFourByteTag()
static constexpr SkFourByteTag SkSetFourByteTag |
( |
char |
a, |
|
|
char |
b, |
|
|
char |
c, |
|
|
char |
d |
|
) |
| |
|
inlinestaticconstexpr |
◆ SkTAbs()
template<typename T >
static T SkTAbs |
( |
T |
value | ) |
|
|
inlinestatic |
◆ SkToBool()
template<typename T >
static constexpr bool SkToBool |
( |
const T & |
x | ) |
|
|
staticconstexpr |
- Returns
- false or true based on the condition
◆ SK_InvalidGenID
constexpr uint32_t SK_InvalidGenID = 0 |
|
staticconstexpr |
The generation IDs in Skia reserve 0 has an invalid marker.
◆ SK_InvalidUniqueID
constexpr uint32_t SK_InvalidUniqueID = 0 |
|
staticconstexpr |
The unique IDs in Skia reserve 0 has an invalid marker.
◆ SK_MaxS16
constexpr int16_t SK_MaxS16 = INT16_MAX |
|
staticconstexpr |
◆ SK_MaxS32
constexpr int32_t SK_MaxS32 = INT32_MAX |
|
staticconstexpr |
◆ SK_MaxS64
constexpr int64_t SK_MaxS64 = INT64_MAX |
|
staticconstexpr |
◆ SK_MinS16
◆ SK_MinS32
◆ SK_MinS64
◆ SK_MSecMax
constexpr SkMSec SK_MSecMax = INT32_MAX |
|
staticconstexpr |
Maximum representable milliseconds; 24d 20h 31m 23.647s.
◆ SK_NaN32
constexpr int32_t SK_NaN32 = INT32_MIN |
|
staticconstexpr |