Go to the source code of this file.
◆ SkAlign2()
static constexpr T SkAlign2 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 15 of file SkAlign.h.
15{
return (
x + 1) >> 1 << 1; }
◆ SkAlign4()
static constexpr T SkAlign4 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 16 of file SkAlign.h.
16{
return (
x + 3) >> 2 << 2; }
◆ SkAlign8()
static constexpr T SkAlign8 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 17 of file SkAlign.h.
17{
return (
x + 7) >> 3 << 3; }
◆ SkAlignPtr()
static constexpr T SkAlignPtr |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 23 of file SkAlign.h.
23 {
25}
static constexpr T SkAlign4(T x)
static constexpr T SkAlign8(T x)
◆ SkAlignTo()
static constexpr size_t SkAlignTo |
( |
size_t |
x, |
|
|
size_t |
alignment |
|
) |
| |
|
inlinestaticconstexpr |
align up to a power of 2
Definition at line 33 of file SkAlign.h.
33 {
34
35 SkASSERT(alignment && (alignment & (alignment - 1)) == 0);
36 return (
x + alignment - 1) & ~(alignment - 1);
37}
◆ SkIsAlign2()
static constexpr bool SkIsAlign2 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 19 of file SkAlign.h.
19{
return 0 == (
x & 1); }
◆ SkIsAlign4()
static constexpr bool SkIsAlign4 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 20 of file SkAlign.h.
20{
return 0 == (
x & 3); }
◆ SkIsAlign8()
static constexpr bool SkIsAlign8 |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 21 of file SkAlign.h.
21{
return 0 == (
x & 7); }
◆ SkIsAlignPtr()
static constexpr bool SkIsAlignPtr |
( |
T |
x | ) |
|
|
staticconstexpr |
Definition at line 26 of file SkAlign.h.
26 {
28}
static constexpr bool SkIsAlign8(T x)
static constexpr bool SkIsAlign4(T x)