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

Unified Diff: src/codec/SkSwizzler.cpp

Issue 1626463002: Refactor swizzle names and types. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
Index: src/codec/SkSwizzler.cpp
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp
index 24cb65fe28e8e027247179eee42c8f0808a05e33..f84b83e23af00ae6157000aad7acf59793b07ff2 100644
--- a/src/codec/SkSwizzler.cpp
+++ b/src/codec/SkSwizzler.cpp
@@ -333,7 +333,7 @@ static void fast_swizzle_bgra_to_n32_unpremul(
// These swizzles trust that the alpha value is already 0xFF.
#ifdef SK_PMCOLOR_IS_RGBA
- SkOpts::swaprb_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_BGRA((uint32_t*) dst, src + offset, width);
#else
memcpy(dst, src + offset, width * bpp);
#endif
@@ -361,9 +361,9 @@ static void fast_swizzle_bgra_to_n32_premul(
SkASSERT(deltaSrc == bpp);
#ifdef SK_PMCOLOR_IS_RGBA
- SkOpts::premul_swaprb_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_bgrA((uint32_t*) dst, src + offset, width);
#else
- SkOpts::premul_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_rgbA((uint32_t*) dst, src + offset, width);
#endif
}
@@ -419,9 +419,9 @@ static void fast_swizzle_rgba_to_n32_premul(
SkASSERT(deltaSrc == bpp);
#ifdef SK_PMCOLOR_IS_RGBA
- SkOpts::premul_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_rgbA((uint32_t*) dst, src + offset, width);
#else
- SkOpts::premul_swaprb_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_bgrA((uint32_t*) dst, src + offset, width);
#endif
}
@@ -450,7 +450,7 @@ static void fast_swizzle_rgba_to_n32_unpremul(
#ifdef SK_PMCOLOR_IS_RGBA
memcpy(dst, src + offset, width * bpp);
#else
- SkOpts::swaprb_xxxa((uint32_t*) dst, (const uint32_t*) (src + offset), width);
+ SkOpts::RGBA_to_BGRA((uint32_t*) dst, src + offset, width);
#endif
}
« no previous file with comments | « bench/SwizzleBench.cpp ('k') | src/core/SkOpts.h » ('j') | src/opts/SkSwizzler_opts.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698