Skia
2D Graphics Library
SkTypes.h File Reference
#include "include/private/base/SkFeatures.h"
#include "include/private/base/SkLoadUserConfig.h"
#include "include/private/base/SkAPI.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkAttributes.h"
#include "include/private/base/SkDebug.h"
#include <climits>
#include <cstdint>
Include dependency graph for SkTypes.h:

Go to the source code of this file.

Macros

#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_ALLOW_STATIC_GLOBAL_INITIALIZERS   0
 
#define SK_GAMMA_EXPONENT   (0.0f)
 
#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 GR_CACHE_STATS   0
 These defines are set to 0 or 1, rather than being undefined or defined TODO: consider updating these for consistency. More...
 
#define GR_GPU_STATS   0
 

Typedefs

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...
 

Functions

static constexpr SkFourByteTag SkSetFourByteTag (char a, char b, char c, char d)
 

Variables

static constexpr SkMSec SK_MSecMax = INT32_MAX
 Maximum representable milliseconds; 24d 20h 31m 23.647s. More...
 
static constexpr uint32_t SK_InvalidGenID = 0
 The generation IDs in Skia reserve 0 has an invalid marker. More...
 
static constexpr uint32_t SK_InvalidUniqueID = 0
 The unique IDs in Skia reserve 0 has an invalid marker. More...
 

Macro Definition Documentation

◆ GR_CACHE_STATS

#define GR_CACHE_STATS   0

These defines are set to 0 or 1, rather than being undefined or defined TODO: consider updating these for consistency.

◆ GR_GPU_STATS

#define GR_GPU_STATS   0

◆ SK_A32_SHIFT

#define SK_A32_SHIFT   24

◆ SK_ALLOW_STATIC_GLOBAL_INITIALIZERS

#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS   0

◆ SK_B32_SHIFT

#define SK_B32_SHIFT   (16-SK_R32_SHIFT)

◆ SK_ENABLE_LEGACY_SHADERCONTEXT

#define SK_ENABLE_LEGACY_SHADERCONTEXT

◆ SK_G32_SHIFT

#define SK_G32_SHIFT   8

◆ 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

#define SK_HISTOGRAM_PERCENTAGE (   name,
  percent_as_int 
)     SK_HISTOGRAM_EXACT_LINEAR(name, percent_as_int, 101)

◆ SK_HISTOGRAMS_ENABLED

#define SK_HISTOGRAMS_ENABLED   0

◆ 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_R32_SHIFT

#define SK_R32_SHIFT   0

Typedef Documentation

◆ SkFourByteTag

typedef uint32_t SkFourByteTag

◆ SkGlyphID

typedef uint16_t SkGlyphID

16 bit unsigned integer to hold a glyph index

◆ SkMSec

typedef uint32_t SkMSec

32 bit value to hold a millisecond duration Note that SK_MSecMax is about 25 days.

◆ SkUnichar

typedef int32_t SkUnichar

32 bit integer to hold a unicode value

Function Documentation

◆ SkSetFourByteTag()

static constexpr SkFourByteTag SkSetFourByteTag ( char  a,
char  b,
char  c,
char  d 
)
inlinestaticconstexpr

Variable Documentation

◆ 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_MSecMax

constexpr SkMSec SK_MSecMax = INT32_MAX
staticconstexpr

Maximum representable milliseconds; 24d 20h 31m 23.647s.