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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp

Issue 2392443003: Add MSA (MIPS SIMD Arch) optimized color conversion functions (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/Source/platform/graphics/cpu/mips/WebGLImageConversionMSA.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
index c485cce7b9240db6d676e2a7b07cf811bb5890ca..9ac3a973e7345250b71e35f454138449489f6dab 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -710,6 +710,9 @@ void pack<WebGLImageConversion::DataFormatR8,
#if CPU(X86) || CPU(X86_64)
SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow);
#endif
+#if HAVE(MIPS_MSA_INTRINSICS)
+ SIMD::packOneRowOfRGBA8LittleToR8MSA(source, destination, pixelsPerRow);
+#endif
for (unsigned i = 0; i < pixelsPerRow; ++i) {
float scaleFactor = source[3] ? 255.0f / source[3] : 1.0f;
uint8_t sourceR =
@@ -764,6 +767,9 @@ void pack<WebGLImageConversion::DataFormatRA8,
#if CPU(X86) || CPU(X86_64)
SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow);
#endif
+#if HAVE(MIPS_MSA_INTRINSICS)
+ SIMD::packOneRowOfRGBA8LittleToRA8MSA(source, destination, pixelsPerRow);
+#endif
for (unsigned i = 0; i < pixelsPerRow; ++i) {
float scaleFactor = source[3] ? 255.0f / source[3] : 1.0f;
uint8_t sourceR =
@@ -903,6 +909,10 @@ void pack<WebGLImageConversion::DataFormatRGBA4444,
#if HAVE(ARM_NEON_INTRINSICS)
SIMD::packOneRowOfRGBA8ToUnsignedShort4444(source, destination, pixelsPerRow);
#endif
+#if HAVE(MIPS_MSA_INTRINSICS)
+ SIMD::packOneRowOfRGBA8ToUnsignedShort4444MSA(source, destination,
+ pixelsPerRow);
+#endif
for (unsigned i = 0; i < pixelsPerRow; ++i) {
*destination = (((source[0] & 0xF0) << 8) | ((source[1] & 0xF0) << 4) |
(source[2] & 0xF0) | (source[3] >> 4));
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/cpu/mips/WebGLImageConversionMSA.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698