Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
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>

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)
 
#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS   0
 
#define SK_GAMMA_EXPONENT   (0.0f)
 
#define SK_GAMMA_CONTRAST   (0.5f)
 
#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
 
#define GR_GPU_STATS   0
 

Typedefs

typedef uint32_t SkFourByteTag
 
typedef int32_t SkUnichar
 
typedef uint16_t SkGlyphID
 
typedef uint32_t SkMSec
 

Functions

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

Variables

static constexpr SkMSec SK_MSecMax = INT32_MAX
 
static constexpr uint32_t SK_InvalidGenID = 0
 
static constexpr uint32_t SK_InvalidUniqueID = 0
 

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

Definition at line 152 of file SkTypes.h.

◆ GR_GPU_STATS

#define GR_GPU_STATS   0

Definition at line 160 of file SkTypes.h.

◆ SK_A32_SHIFT

#define SK_A32_SHIFT   24

Definition at line 54 of file SkTypes.h.

◆ SK_ALLOW_STATIC_GLOBAL_INITIALIZERS

#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS   0

Definition at line 82 of file SkTypes.h.

◆ SK_B32_SHIFT

#define SK_B32_SHIFT   (16-SK_R32_SHIFT)

Definition at line 50 of file SkTypes.h.

◆ SK_ENABLE_LEGACY_SHADERCONTEXT

#define SK_ENABLE_LEGACY_SHADERCONTEXT

Definition at line 134 of file SkTypes.h.

◆ SK_G32_SHIFT

#define SK_G32_SHIFT   8

Definition at line 53 of file SkTypes.h.

◆ SK_GAMMA_CONTRAST

#define SK_GAMMA_CONTRAST   (0.5f)

Definition at line 94 of file SkTypes.h.

◆ SK_GAMMA_EXPONENT

#define SK_GAMMA_EXPONENT   (0.0f)

Definition at line 86 of file SkTypes.h.

◆ SK_HISTOGRAM_BOOLEAN

#define SK_HISTOGRAM_BOOLEAN (   name,
  sample 
)

Definition at line 107 of file SkTypes.h.

◆ SK_HISTOGRAM_ENUMERATION

#define SK_HISTOGRAM_ENUMERATION (   name,
  sample,
  enum_size 
)

Definition at line 111 of file SkTypes.h.

◆ SK_HISTOGRAM_EXACT_LINEAR

#define SK_HISTOGRAM_EXACT_LINEAR (   name,
  sample,
  value_max 
)

Definition at line 115 of file SkTypes.h.

◆ SK_HISTOGRAM_MEMORY_KB

#define SK_HISTOGRAM_MEMORY_KB (   name,
  sample 
)

Definition at line 119 of file SkTypes.h.

◆ SK_HISTOGRAM_PERCENTAGE

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

Definition at line 122 of file SkTypes.h.

166 {
167 return (((uint32_t)a << 24) | ((uint32_t)b << 16) | ((uint32_t)c << 8) | (uint32_t)d);
168}
169
170////////////////////////////////////////////////////////////////////////////////
171
172/** 32 bit integer to hold a unicode value
173*/
174typedef int32_t SkUnichar;
175
176/** 16 bit unsigned integer to hold a glyph index
177*/
178typedef uint16_t SkGlyphID;
179
180/** 32 bit value to hold a millisecond duration
181 Note that SK_MSecMax is about 25 days.
182*/
183typedef uint32_t SkMSec;
184
185/** Maximum representable milliseconds; 24d 20h 31m 23.647s.
186*/
187static constexpr SkMSec SK_MSecMax = INT32_MAX;
188
189/** The generation IDs in Skia reserve 0 has an invalid marker.
190*/
191static constexpr uint32_t SK_InvalidGenID = 0;
192
193/** The unique IDs in Skia reserve 0 has an invalid marker.
194*/
195static constexpr uint32_t SK_InvalidUniqueID = 0;
196
197
198#endif
static constexpr SkMSec SK_MSecMax
Definition SkTypes.h:188
int32_t SkUnichar
Definition SkTypes.h:175
uint16_t SkGlyphID
Definition SkTypes.h:179
static constexpr uint32_t SK_InvalidUniqueID
Definition SkTypes.h:196
static constexpr uint32_t SK_InvalidGenID
Definition SkTypes.h:192
uint32_t SkMSec
Definition SkTypes.h:184
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition main.cc:19
static bool b
struct MyStruct a[10]

◆ SK_HISTOGRAMS_ENABLED

#define SK_HISTOGRAMS_ENABLED   0

Definition at line 103 of file SkTypes.h.

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

Definition at line 66 of file SkTypes.h.

◆ SK_R32_SHIFT

#define SK_R32_SHIFT   0

Definition at line 44 of file SkTypes.h.

Typedef Documentation

◆ SkFourByteTag

typedef uint32_t SkFourByteTag

Definition at line 166 of file SkTypes.h.

◆ SkGlyphID

typedef uint16_t SkGlyphID

16 bit unsigned integer to hold a glyph index

Definition at line 179 of file SkTypes.h.

◆ SkMSec

typedef uint32_t SkMSec

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

Definition at line 184 of file SkTypes.h.

◆ SkUnichar

typedef int32_t SkUnichar

32 bit integer to hold a unicode value

Definition at line 175 of file SkTypes.h.

Function Documentation

◆ SkSetFourByteTag()

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

Definition at line 167 of file SkTypes.h.

167 {
168 return (((uint32_t)a << 24) | ((uint32_t)b << 16) | ((uint32_t)c << 8) | (uint32_t)d);
169}

Variable Documentation

◆ SK_InvalidGenID

constexpr uint32_t SK_InvalidGenID = 0
staticconstexpr

The generation IDs in Skia reserve 0 has an invalid marker.

Definition at line 192 of file SkTypes.h.

◆ SK_InvalidUniqueID

constexpr uint32_t SK_InvalidUniqueID = 0
staticconstexpr

The unique IDs in Skia reserve 0 has an invalid marker.

Definition at line 196 of file SkTypes.h.

◆ SK_MSecMax

constexpr SkMSec SK_MSecMax = INT32_MAX
staticconstexpr

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

Definition at line 188 of file SkTypes.h.