aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkOpts_avx.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-13 08:02:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 08:02:20 -0700
commit0358a6ac00497ecb9fa9412045560b7f33d3a9eb (patch)
tree30f281a0afad4905da65c76b7c5aacf73bd04738 /src/opts/SkOpts_avx.cpp
parent9199a9fef9896636f673372d2ac1c00af036bf85 (diff)
Update SkOpts namespaces.
If we make sure all SkOpts functions are static, we can give the namespaces any name we like. This lets us drop the sk_ prefix and give a real indication of the default SIMD instruction set rather than just saying sk_default. Both of these changes help debugger, profiler, and crash report readability. Perhaps more importantly, keeping these functions static helps prevent accidentally linking in unused versions of functions, as you see here with sk_avx::srcover_srgb_srgb(). This requires we update SkBlend_opts tests and benches to call SkOpts functions through SkOpts rather than declaring the methods externally. In practice this drops testing of the SSE2 version on machines with SSE4. If we still really need to test/bench the compile time best SIMD level version of this method against the runtime detected best, we can include SkBlend_opts.h into the tests or benches directly, similar to what we do for the trivial, brute-force, or best non-SIMD versions. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145833002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2145833002
Diffstat (limited to 'src/opts/SkOpts_avx.cpp')
-rw-r--r--src/opts/SkOpts_avx.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/opts/SkOpts_avx.cpp b/src/opts/SkOpts_avx.cpp
index 835e0c0ded..b5df2b69f0 100644
--- a/src/opts/SkOpts_avx.cpp
+++ b/src/opts/SkOpts_avx.cpp
@@ -7,8 +7,7 @@
#include "SkOpts.h"
-#define SK_OPTS_NS sk_avx
-#include "SkBlend_opts.h"
+#define SK_OPTS_NS avx
namespace SkOpts {
void Init_avx() { }