diff --git a/include/core/SkSwizzle.h b/include/core/SkSwizzle.h index 61e93b2da7..9a26f0f492 100644 --- ./include/core/SkSwizzle.h +++ ./include/core/SkSwizzle.h @@ -16,4 +16,8 @@ */ SK_API void SkSwapRB(uint32_t* dest, const uint32_t* src, int count); +SK_API void SkExtendRGBToRGBA(uint32_t* dest, const uint8_t* src, int count); + +SK_API void SkExtendGrayToRGBA(uint32_t* dest, const uint8_t* src, int count); + #endif diff --git a/src/core/SkSwizzle.cpp b/src/core/SkSwizzle.cpp index 301b0184f1..382323695f 100644 --- ./src/core/SkSwizzle.cpp +++ ./src/core/SkSwizzle.cpp @@ -12,3 +12,11 @@ void SkSwapRB(uint32_t* dest, const uint32_t* src, int count) { SkOpts::RGBA_to_BGRA(dest, src, count); } + +void SkExtendRGBToRGBA(uint32_t* dest, const uint8_t* src, int count) { + SkOpts::RGB_to_RGB1(dest, src, count); +} + +void SkExtendGrayToRGBA(uint32_t* dest, const uint8_t* src, int count) { + SkOpts::gray_to_RGB1(dest, src, count); +}