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

Unified Diff: src/opts/SkBlitRow_opts_arm_neon.cpp

Issue 1314863006: Port SkBlitRow::Color32 to SkOpts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « src/opts/SkBlitRow_opts_arm_neon.h ('k') | src/opts/SkBlitRow_opts_none.cpp » ('j') | 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 d5260afd503319a55243213e06147423b03a4e3c..1f97971ee48ab99fb23c8ae47fc44a81f23fe478 100644
--- a/src/opts/SkBlitRow_opts_arm_neon.cpp
+++ b/src/opts/SkBlitRow_opts_arm_neon.cpp
@@ -1582,20 +1582,3 @@ const SkBlitRow::Proc32 sk_blitrow_platform_32_procs_arm_neon[] = {
nullptr
#endif
};
-
-#include "Sk4px.h"
-
-void sk_blitrow_color32_arm_neon(SkPMColor* dst, const SkPMColor* src, int count, SkPMColor color) {
- // Until it becomes a little more reasonable to assume we'll be built with NEON,
- // we copy our Sk4px implementation of SkBlitRow::Color32 here so it picks up NEON at runtime.
- unsigned invA = 255 - SkGetPackedA32(color);
- invA += invA >> 7;
- SkASSERT(invA < 256); // Our caller has already handled the alpha == 0 case.
-
- Sk16h colorHighAndRound = Sk4px::DupPMColor(color).widenHi() + Sk16h(128);
- Sk16b invA_16x(invA);
-
- Sk4px::MapSrc(count, dst, src, [&](const Sk4px& src4) -> Sk4px {
- return (src4 * invA_16x).addNarrowHi(colorHighAndRound);
- });
-}
« no previous file with comments | « src/opts/SkBlitRow_opts_arm_neon.h ('k') | src/opts/SkBlitRow_opts_none.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698