summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-12-08 12:46:40 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-12-09 11:50:33 +0100
commit991b4e032a4834779aac100607ffc13758328c4a (patch)
treed79c1aa24e9c5fc0b5753dbcbc873dbbd93b5154 /external
parent65b47341fe668e74430cf12aa84f9357e0dbd6bb (diff)
better name for a helper Skia function
What it really does is converting RGBA to R, so name it after what it does. That the result happens to be kind-of-grey of the RGBA is just a result of VCL providing the data that way. Change-Id: Ic017e34d91879679e0a7dad4d6ab35650fc3a89b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107408 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/skia/inc/skia_opts.hxx4
-rw-r--r--external/skia/source/skia_opts.cxx6
-rw-r--r--external/skia/source/skia_opts_internal.hxx10
-rw-r--r--external/skia/source/skia_opts_ssse3.cxx2
4 files changed, 11 insertions, 11 deletions
diff --git a/external/skia/inc/skia_opts.hxx b/external/skia/inc/skia_opts.hxx
index e292f0920fe8..33f82f9d2218 100644
--- a/external/skia/inc/skia_opts.hxx
+++ b/external/skia/inc/skia_opts.hxx
@@ -14,7 +14,7 @@ SK_API void SkConvertGrayToRGBA(uint32_t* dest, const uint8_t* src, int count);
SK_API void SkConvertRGBAToRGB(uint8_t* dest, const uint32_t* src, int count);
-SK_API void SkConvertRGBAToGrayFast(uint8_t* dest, const uint32_t* src, int count);
+SK_API void SkConvertRGBAToR(uint8_t* dest, const uint32_t* src, int count);
namespace SkLoOpts
{
@@ -22,7 +22,7 @@ SK_API void Init();
typedef void (*Swizzle_u8_8888)(uint8_t*, const uint32_t*, int);
extern Swizzle_u8_8888 RGB1_to_RGB, // i.e. remove an (opaque) alpha
- RGB1_to_gray_fast; // i.e. copy one channel to the result
+ RGB1_to_R; // i.e. copy one channel to the result
}
#endif
diff --git a/external/skia/source/skia_opts.cxx b/external/skia/source/skia_opts.cxx
index 061e599e71ab..9bfe04e14459 100644
--- a/external/skia/source/skia_opts.cxx
+++ b/external/skia/source/skia_opts.cxx
@@ -30,9 +30,9 @@ void SkConvertRGBAToRGB(uint8_t* dest, const uint32_t* src, int count)
SkLoOpts::RGB1_to_RGB(dest, src, count);
}
-void SkConvertRGBAToGrayFast(uint8_t* dest, const uint32_t* src, int count)
+void SkConvertRGBAToR(uint8_t* dest, const uint32_t* src, int count)
{
- SkLoOpts::RGB1_to_gray_fast(dest, src, count);
+ SkLoOpts::RGB1_to_R(dest, src, count);
}
// The rest is mostly based on Skia's SkOpts.cpp, reduced to only SSSE3 so far.
@@ -52,7 +52,7 @@ namespace SkLoOpts {
// They'll still get a chance to be replaced with even better ones, e.g. using SSE4.1.
#define DEFINE_DEFAULT(name) decltype(name) name = SK_OPTS_NS::name
DEFINE_DEFAULT(RGB1_to_RGB);
- DEFINE_DEFAULT(RGB1_to_gray_fast);
+ DEFINE_DEFAULT(RGB1_to_R);
#undef DEFINE_DEFAULT
// Each Init_foo() is defined in its own file.
diff --git a/external/skia/source/skia_opts_internal.hxx b/external/skia/source/skia_opts_internal.hxx
index 7b81c20da271..1f46ee72eb4a 100644
--- a/external/skia/source/skia_opts_internal.hxx
+++ b/external/skia/source/skia_opts_internal.hxx
@@ -20,7 +20,7 @@ static void RGB1_to_RGB_portable(uint8_t dst[], const uint32_t* src, int count)
dst += 3;
}
}
-static void RGB1_to_gray_fast_portable(uint8_t dst[], const uint32_t* src, int count) {
+static void RGB1_to_R_portable(uint8_t dst[], const uint32_t* src, int count) {
for (int i = 0; i < count; i++) {
dst[i] = src[i] & 0xFF;
}
@@ -48,7 +48,7 @@ inline void RGB1_to_RGB(uint8_t dst[], const uint32_t* src, int count) {
RGB1_to_RGB_portable(dst, src, count);
}
-inline void RGB1_to_gray_fast(uint8_t dst[], const uint32_t* src, int count) {
+inline void RGB1_to_R(uint8_t dst[], const uint32_t* src, int count) {
const uint8_t X = 0xFF; // Used a placeholder. The value of X is irrelevant.
__m128i pack = _mm_setr_epi8(0,4,8,12, X,X,X,X,X,X,X,X,X,X,X,X);
@@ -66,15 +66,15 @@ inline void RGB1_to_gray_fast(uint8_t dst[], const uint32_t* src, int count) {
dst += 4;
count -= 4;
}
- RGB1_to_gray_fast_portable(dst, src, count);
+ RGB1_to_R_portable(dst, src, count);
}
#else
inline void RGB1_to_RGB(uint8_t dst[], const uint32_t* src, int count) {
RGB1_to_RGB_portable(dst, src, count);
}
-inline void RGB1_to_gray_fast(uint8_t dst[], const uint32_t* src, int count) {
- RGB1_to_gray_fast_portable(dst, src, count);
+inline void RGB1_to_R(uint8_t dst[], const uint32_t* src, int count) {
+ RGB1_to_R_portable(dst, src, count);
}
#endif
diff --git a/external/skia/source/skia_opts_ssse3.cxx b/external/skia/source/skia_opts_ssse3.cxx
index 8d19b6eeabaf..31a446c99af5 100644
--- a/external/skia/source/skia_opts_ssse3.cxx
+++ b/external/skia/source/skia_opts_ssse3.cxx
@@ -12,6 +12,6 @@
namespace SkLoOpts {
void Init_ssse3() {
RGB1_to_RGB = ssse3::RGB1_to_RGB;
- RGB1_to_gray_fast = ssse3::RGB1_to_gray_fast;
+ RGB1_to_R = ssse3::RGB1_to_R;
}
}