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

Unified Diff: src/opts/SkBlitRow_opts_SSE4.h

Issue 873553003: Revert of SSE4 opaque blend using intrinsics instead of assembly. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « gyp/opts.gypi ('k') | src/opts/SkBlitRow_opts_SSE4.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBlitRow_opts_SSE4.h
diff --git a/src/opts/SkBlitRow_opts_SSE4.h b/src/opts/SkBlitRow_opts_SSE4.h
index 577ace6f8fe462a8083b87a75e2faed377fac5b0..600e669893dd32bb156d3b5cfd2686e50eeb715b 100644
--- a/src/opts/SkBlitRow_opts_SSE4.h
+++ b/src/opts/SkBlitRow_opts_SSE4.h
@@ -10,9 +10,24 @@
#include "SkBlitRow.h"
-void S32A_Opaque_BlitRow32_SSE4(SkPMColor* SK_RESTRICT,
- const SkPMColor* SK_RESTRICT,
- int count,
- U8CPU alpha);
+#ifdef CRBUG_399842_FIXED
+
+/* Check if we are able to build assembly code, GCC/AT&T syntax:
+ * 1) Clang and GCC are generally OK. OS X's old LLVM-GCC 4.2 can't handle it;
+ * 2) We're intentionally not linking this in even when supported (Clang) on Windows;
+ * 3) MemorySanitizer cannot instrument assembly at all.
+ */
+#if /* 1)*/ (defined(__clang__) || (defined(__GNUC__) && !defined(SK_BUILD_FOR_MAC))) \
+ /* 2)*/ && !defined(SK_BUILD_FOR_WIN) \
+ /* 3)*/ && !defined(MEMORY_SANITIZER)
+extern "C" void S32A_Opaque_BlitRow32_SSE4_asm(SkPMColor* SK_RESTRICT dst,
+ const SkPMColor* SK_RESTRICT src,
+ int count, U8CPU alpha);
+
+#define SK_ATT_ASM_SUPPORTED
#endif
+#endif // CRBUG_399842_FIXED
+
+#endif
+
« no previous file with comments | « gyp/opts.gypi ('k') | src/opts/SkBlitRow_opts_SSE4.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698