Flutter Engine
The Flutter Engine
Functions
SkRectMemcpy.h File Reference
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTemplates.h"
#include <cstring>

Go to the source code of this file.

Functions

static void SkRectMemcpy (void *dst, size_t dstRB, const void *src, size_t srcRB, size_t trimRowBytes, int rowCount)
 

Function Documentation

◆ SkRectMemcpy()

static void SkRectMemcpy ( void *  dst,
size_t  dstRB,
const void *  src,
size_t  srcRB,
size_t  trimRowBytes,
int  rowCount 
)
inlinestatic

Definition at line 16 of file SkRectMemcpy.h.

17 {
18 SkASSERT(trimRowBytes <= dstRB);
19 SkASSERT(trimRowBytes <= srcRB);
20 if (trimRowBytes == dstRB && trimRowBytes == srcRB) {
21 memcpy(dst, src, trimRowBytes * rowCount);
22 return;
23 }
24
25 for (int i = 0; i < rowCount; ++i) {
26 memcpy(dst, src, trimRowBytes);
27 dst = SkTAddOffset<void>(dst, dstRB);
28 src = SkTAddOffset<const void>(src, srcRB);
29 }
30}
#define SkASSERT(cond)
Definition: SkAssert.h:116
dst
Definition: cp.py:12