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

Unified Diff: src/codec/SkMaskSwizzler.cpp

Issue 1256373002: Pass the destination pointer to next (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Thanks windows bot! Created 5 years, 5 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/codec/SkMaskSwizzler.h ('k') | src/codec/SkSwizzler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkMaskSwizzler.cpp
diff --git a/src/codec/SkMaskSwizzler.cpp b/src/codec/SkMaskSwizzler.cpp
index 58ae11d852d083e7a39f0d8c2be85e9b713fef1b..d0bb646740a10a2a484a324524a85f2e1d9daee9 100644
--- a/src/codec/SkMaskSwizzler.cpp
+++ b/src/codec/SkMaskSwizzler.cpp
@@ -174,8 +174,7 @@ static SkSwizzler::ResultAlpha swizzle_mask32_to_n32_premul(
*
*/
SkMaskSwizzler* SkMaskSwizzler::CreateMaskSwizzler(
- const SkImageInfo& info, void* dst, size_t dstRowBytes, SkMasks* masks,
- uint32_t bitsPerPixel) {
+ const SkImageInfo& info, SkMasks* masks, uint32_t bitsPerPixel) {
// Choose the appropriate row procedure
RowProc proc = NULL;
@@ -247,7 +246,7 @@ SkMaskSwizzler* SkMaskSwizzler::CreateMaskSwizzler(
SkASSERT(false);
return NULL;
}
- return SkNEW_ARGS(SkMaskSwizzler, (info, dst, dstRowBytes, masks, proc));
+ return SkNEW_ARGS(SkMaskSwizzler, (info, masks, proc));
}
/*
@@ -255,11 +254,9 @@ SkMaskSwizzler* SkMaskSwizzler::CreateMaskSwizzler(
* Constructor for mask swizzler
*
*/
-SkMaskSwizzler::SkMaskSwizzler(const SkImageInfo& dstInfo, void* dst,
- size_t dstRowBytes, SkMasks* masks, RowProc proc)
+SkMaskSwizzler::SkMaskSwizzler(const SkImageInfo& dstInfo, SkMasks* masks,
+ RowProc proc)
: fDstInfo(dstInfo)
- , fDst(dst)
- , fDstRowBytes(dstRowBytes)
, fMasks(masks)
, fRowProc(proc)
{}
@@ -269,11 +266,7 @@ SkMaskSwizzler::SkMaskSwizzler(const SkImageInfo& dstInfo, void* dst,
* Swizzle the specified row
*
*/
-SkSwizzler::ResultAlpha SkMaskSwizzler::next(const uint8_t* SK_RESTRICT src,
- int y) {
- // Choose the row
- void* row = SkTAddOffset<void>(fDst, y*fDstRowBytes);
-
- // Decode the row
- return fRowProc(row, src, fDstInfo.width(), fMasks);
+SkSwizzler::ResultAlpha SkMaskSwizzler::swizzle(void* dst, const uint8_t* SK_RESTRICT src) {
+ SkASSERT(NULL != dst && NULL != src);
+ return fRowProc(dst, src, fDstInfo.width(), fMasks);
}
« no previous file with comments | « src/codec/SkMaskSwizzler.h ('k') | src/codec/SkSwizzler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698