Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: src/core/SkConfig8888.cpp

Issue 1197713003: Move rect_memcopy from helper to global static. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkConfig8888.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkConfig8888.cpp
diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp
index d28941c27cf79120d3cd2a041ca577988c7bd82c..f49ab45c67db74a173413f95f5626ac4a0b6af8d 100644
--- a/src/core/SkConfig8888.cpp
+++ b/src/core/SkConfig8888.cpp
@@ -126,17 +126,6 @@ bool SkSrcPixelInfo::convertPixelsTo(SkDstPixelInfo* dst, int width, int height)
return true;
}
-static void rect_memcpy(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;
- }
-}
-
static void copy_g8_to_32(void* dst, size_t dstRB, const void* src, size_t srcRB, int w, int h) {
uint32_t* dst32 = (uint32_t*)dst;
const uint8_t* src8 = (const uint8_t*)src;
@@ -222,7 +211,7 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t
default:
return false;
}
- rect_memcpy(dstPixels, dstRB, srcPixels, srcRB, width * srcInfo.bytesPerPixel(), height);
+ SkRectMemcpy(dstPixels, dstRB, srcPixels, srcRB, width * srcInfo.bytesPerPixel(), height);
return true;
}
« no previous file with comments | « src/core/SkConfig8888.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698