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

Unified Diff: src/opts/SkBlitRow_opts_arm_neon.cpp

Issue 458453002: Fix S32A_D565_Opaque for RGBA on arm64 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBlitRow_opts_arm_neon.cpp
diff --git a/src/opts/SkBlitRow_opts_arm_neon.cpp b/src/opts/SkBlitRow_opts_arm_neon.cpp
index 1911a068b15d6f2fa70f3b4c6903878974f1af13..94ab77ca1dd7703b930afa327b9ef6324f27fe64 100644
--- a/src/opts/SkBlitRow_opts_arm_neon.cpp
+++ b/src/opts/SkBlitRow_opts_arm_neon.cpp
@@ -423,8 +423,15 @@ void S32A_D565_Opaque_neon(uint16_t* SK_RESTRICT dst,
"ushr v5.8h, v22.8h, #5 \t\n"
"addhn2 v6.16b, v22.8h, v5.8h \t\n"
"uqadd v7.16b, v1.16b, v7.16b \t\n"
+#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
"uqadd v20.16b, v2.16b, v20.16b \t\n"
"uqadd v6.16b, v0.16b, v6.16b \t\n"
+#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
+ "uqadd v20.16b, v0.16b, v20.16b \t\n"
+ "uqadd v6.16b, v2.16b, v6.16b \t\n"
+#else
+#error "This function only supports BGRA and RGBA."
+#endif
"shll v22.8h, v20.8b, #8 \t\n"
"shll v5.8h, v7.8b, #8 \t\n"
"sri v22.8h, v5.8h, #5 \t\n"
@@ -1643,11 +1650,7 @@ const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm_neon[] = {
// no dither
S32_D565_Opaque_neon,
S32_D565_Blend_neon,
-#ifdef SK_CPU_ARM32
S32A_D565_Opaque_neon,
-#else
- NULL,
-#endif
S32A_D565_Blend_neon,
// dither
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698