#include <Sk4px.h>
|
static Sk4px | DupPMColor (SkPMColor c) |
|
static Sk4px | Load4 (const SkPMColor px[4]) |
|
static Sk4px | Load2 (const SkPMColor px[2]) |
|
static Sk4px | Load1 (const SkPMColor px[1]) |
|
static Sk4px | Load4Alphas (const SkAlpha alphas[4]) |
|
static Sk4px | Load2Alphas (const SkAlpha alphas[2]) |
|
template<typename Fn > |
static void | MapSrc (int n, SkPMColor *dst, const SkPMColor *src, const Fn &fn) |
|
template<typename Fn > |
static void | MapDstSrc (int n, SkPMColor *dst, const SkPMColor *src, const Fn &fn) |
|
template<typename Fn > |
static void | MapDstAlpha (int n, SkPMColor *dst, const SkAlpha *a, const Fn &fn) |
|
template<typename Fn > |
static void | MapDstSrcAlpha (int n, SkPMColor *dst, const SkPMColor *src, const SkAlpha *a, const Fn &fn) |
|
Definition at line 16 of file Sk4px.h.
◆ Sk4px()
◆ alphas()
Sk4px Sk4px::alphas |
( |
| ) |
const |
|
inline |
Definition at line 29 of file Sk4px.h.
29 {
30 static_assert(
SK_A32_SHIFT == 24,
"This method assumes little-endian.");
31 return Sk4px(skvx::shuffle<3,3,3,3, 7,7,7,7, 11,11,11,11, 15,15,15,15>(fV));
32 }
◆ approxMulDiv255()
Sk4px Sk4px::approxMulDiv255 |
( |
const Sk4px & |
o | ) |
const |
|
inline |
Definition at line 105 of file Sk4px.h.
105 {
107 }
SIN Vec< N, uint8_t > approx_scale(const Vec< N, uint8_t > &x, const Vec< N, uint8_t > &y)
◆ DupPMColor()
Definition at line 20 of file Sk4px.h.
20 {
22
24 memcpy((void*)&v, &splat, 16);
25 return v;
26 }
◆ inv()
Sk4px Sk4px::inv |
( |
| ) |
const |
|
inline |
◆ Load1()
Definition at line 46 of file Sk4px.h.
46 {
48 memcpy((void*)&v, px, 4);
49 return v;
50 }
◆ Load2()
Definition at line 41 of file Sk4px.h.
41 {
43 memcpy((void*)&v, px, 8);
44 return v;
45 }
◆ Load2Alphas()
Definition at line 59 of file Sk4px.h.
59 {
62 }
static SkString join(const CommandLineFlags::StringArray &)
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)
◆ Load4()
Definition at line 36 of file Sk4px.h.
36 {
38 memcpy((void*)&v, px, 16);
39 return v;
40 }
◆ Load4Alphas()
Definition at line 54 of file Sk4px.h.
54 {
56 return Sk4px(skvx::shuffle<0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3>(
a));
57 }
◆ MapDstAlpha()
Definition at line 179 of file Sk4px.h.
180 {
183 while (n > 0) {
184 if (n >= 8) {
189 dst += 8;
a += 8; n -= 8;
190 continue;
191 }
193 if (n >= 4) {
195 dst += 4;
a += 4; n -= 4;
196 }
197 if (n >= 2) {
199 dst += 2;
a += 2; n -= 2;
200 }
201 if (n >= 1) {
203 }
204 break;
205 }
206 }
static Sk4px Load2Alphas(const SkAlpha alphas[2])
static Sk4px Load4Alphas(const SkAlpha alphas[4])
static Sk4px Load2(const SkPMColor px[2])
void store4(SkPMColor px[4]) const
static Sk4px Load1(const SkPMColor px[1])
static Sk4px Load4(const SkPMColor px[4])
◆ MapDstSrc()
Definition at line 148 of file Sk4px.h.
149 {
152 while (n > 0) {
153 if (n >= 8) {
158 dst += 8;
src += 8; n -= 8;
159 continue;
160 }
162 if (n >= 4) {
164 dst += 4;
src += 4; n -= 4;
165 }
166 if (n >= 2) {
168 dst += 2;
src += 2; n -= 2;
169 }
170 if (n >= 1) {
172 }
173 break;
174 }
175 }
◆ MapDstSrcAlpha()
Definition at line 210 of file Sk4px.h.
211 {
215 while (n > 0) {
216 if (n >= 8) {
221 dst += 8;
src += 8;
a += 8; n -= 8;
222 continue;
223 }
225 if (n >= 4) {
227 dst += 4;
src += 4;
a += 4; n -= 4;
228 }
229 if (n >= 2) {
231 dst += 2;
src += 2;
a += 2; n -= 2;
232 }
233 if (n >= 1) {
235 }
236 break;
237 }
238 }
◆ MapSrc()
Definition at line 116 of file Sk4px.h.
116 {
119
120
121 while (n > 0) {
122 if (n >= 8) {
127 dst += 8;
src += 8; n -= 8;
128 continue;
129 }
131 if (n >= 4) {
133 dst += 4;
src += 4; n -= 4;
134 }
135 if (n >= 2) {
137 dst += 2;
src += 2; n -= 2;
138 }
139 if (n >= 1) {
141 }
142 break;
143 }
144 }
◆ mulWiden()
Definition at line 90 of file Sk4px.h.
90{
return Wide(
mull(fV, o)); }
SIN Vec< N, uint16_t > mull(const Vec< N, uint8_t > &x, const Vec< N, uint8_t > &y)
◆ operator&()
◆ operator*()
Wide Sk4px::operator* |
( |
const Sk4px & |
o | ) |
const |
|
inline |
Definition at line 93 of file Sk4px.h.
Wide mulWiden(const skvx::byte16 &o) const
◆ operator+()
◆ operator-()
◆ operator<()
◆ saturatedAdd()
Sk4px Sk4px::saturatedAdd |
( |
const Sk4px & |
o | ) |
const |
|
inline |
Definition at line 109 of file Sk4px.h.
109 {
111 }
SINT std::enable_if_t< std::is_unsigned_v< T >, Vec< N, T > > saturated_add(const Vec< N, T > &x, const Vec< N, T > &y)
◆ store1()
Definition at line 66 of file Sk4px.h.
66{ memcpy(px, this, 4); }
◆ store2()
Definition at line 65 of file Sk4px.h.
65{ memcpy(px, this, 8); }
◆ store4()
Definition at line 64 of file Sk4px.h.
64{ memcpy(px, this, 16); }
◆ thenElse()
◆ widen()
Wide Sk4px::widen |
( |
| ) |
const |
|
inline |
Definition at line 88 of file Sk4px.h.
88{ return Wide(skvx::cast<uint16_t>(fV)); }
The documentation for this class was generated from the following file: