Lines Matching refs:src
6 const void* SK_RESTRICT src, int n) {
9 const uint8_t* s = (const uint8_t*)src;
64 #define PB_MEMCPY(dst, src, count) \
67 memcpy(dst, src, count); \
69 small_memcpy(dst, src, count); \
155 const uint16_t SK_RESTRICT src[], int count) {
162 PB_MEMCPY(dst, src, n * sizeof(uint16_t));
163 src += n;
171 const uint8_t SK_RESTRICT src[], int count) {
178 PB_MEMCPY(dst, src, n);
179 src += n;
186 size_t SkPackBits::Pack16(const uint16_t SK_RESTRICT src[], int count,
189 const uint16_t* stop = src + count;
192 count = stop - src;
199 *dst++ = (uint8_t)(*src >> 8);
200 *dst++ = (uint8_t)*src;
204 unsigned value = *src;
205 const uint16_t* s = src + 1;
214 dst = flush_same16(dst, value, s - src);
223 dst = flush_diff16(dst, src, s - src);
225 src = s;
229 size_t SkPackBits::Pack8(const uint8_t SK_RESTRICT src[], int count,
232 const uint8_t* stop = src + count;
235 count = stop - src;
242 *dst++ = *src;
246 unsigned value = *src;
247 const uint8_t* s = src + 1;
256 dst = flush_same8(dst, value, s - src);
267 dst = flush_diff8(dst, src, s - src);
269 src = s;
275 int SkPackBits::Unpack16(const uint8_t SK_RESTRICT src[], size_t srcSize,
278 const uint8_t* stop = src + srcSize;
280 while (src < stop) {
281 unsigned n = *src++;
284 sk_memset16(dst, (src[0] << 8) | src[1], n);
285 src += 2;
288 PB_MEMCPY(dst, src, n * sizeof(uint16_t));
289 src += n * sizeof(uint16_t);
293 SkASSERT(src == stop);
297 int SkPackBits::Unpack8(const uint8_t SK_RESTRICT src[], size_t srcSize,
300 const uint8_t* stop = src + srcSize;
302 while (src < stop) {
303 unsigned n = *src++;
306 PB_MEMSET(dst, *src++, n);
309 PB_MEMCPY(dst, src, n);
310 src += n;
314 SkASSERT(src == stop);
325 size_t dstWrite, const uint8_t SK_RESTRICT src[]) {
335 unsigned n = *src++;
342 // we don't increment src here, since its needed in stage 2
344 src++; // skip the src byte
353 src += n;
366 PB_MEMSET(dst, *src++, stateCount);
371 PB_MEMCPY(dst, src, stateCount);
372 src += stateCount;
383 unsigned n = *src++;
390 PB_MEMSET(dst, *src++, n);
397 PB_MEMCPY(dst, src, n);
398 src += n;