aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkConfig8888.h
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-06-19 10:52:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-19 10:52:25 -0700
commit393551e338a3516606ad10b2d6342e16dd3ac610 (patch)
tree1ddad137445185e185791bcae5085d3d0c6e1aad /src/core/SkConfig8888.h
parent7054257de9ab53a9daf97e51d5e20178c9604e67 (diff)
Move rect_memcopy from helper to global static.
Diffstat (limited to 'src/core/SkConfig8888.h')
-rw-r--r--src/core/SkConfig8888.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkConfig8888.h b/src/core/SkConfig8888.h
index 274e3e57c2..954f2b5387 100644
--- a/src/core/SkConfig8888.h
+++ b/src/core/SkConfig8888.h
@@ -34,4 +34,15 @@ struct SkSrcPixelInfo : SkPixelInfo {
bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const;
};
+static inline void SkRectMemcpy(void* dst, size_t dstRB, const void* src, size_t srcRB,
+ size_t bytesPerRow, int rowCount) {
+ SkASSERT(bytesPerRow <= srcRB);
+ SkASSERT(bytesPerRow <= dstRB);
+ for (int i = 0; i < rowCount; ++i) {
+ memcpy(dst, src, bytesPerRow);
+ dst = (char*)dst + dstRB;
+ src = (const char*)src + srcRB;
+ }
+}
+
#endif