aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkOpts_avx.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-11-11 11:39:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-11 11:39:09 -0800
commit084db25d47dbad3ffbd7d15c04b63d344b351f90 (patch)
tree1152701d1608211322670f1246c7228978d8e32e /src/opts/SkOpts_avx.cpp
parent9be5ff6f9871ef22740094e7c25dd67329a73d20 (diff)
float xfermodes (burn, dodge, softlight) in Sk8f, possibly using AVX.
Xfermode_ColorDodge_aa 10.3ms -> 7.85ms 0.76x Xfermode_SoftLight_aa 13.8ms -> 10.2ms 0.74x Xfermode_ColorBurn_aa 10.7ms -> 7.82ms 0.73x Xfermode_SoftLight 33.6ms -> 23.2ms 0.69x Xfermode_ColorDodge 25ms -> 16.5ms 0.66x Xfermode_ColorBurn 26.1ms -> 16.6ms 0.63x Ought to be no pixel diffs: https://gold.skia.org/search2?issue=1432903002&unt=true&query=source_type%3Dgm&master=false Incidental stuff: I made the SkNx(T) constructors implicit to make writing math expressions simpler. This allows us to write expressions like Sk4f v; ... v = v*4; rather than Sk4f v; ... v = v * Sk4f(4); As written it only works when the constant is on the right-hand side, so expressions like `(Sk4f(1) - da)` have to stay for now. I plan on following up with a CL that lets those become `(1 - da)` too. BUG=skia:4117 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1432903002
Diffstat (limited to 'src/opts/SkOpts_avx.cpp')
-rw-r--r--src/opts/SkOpts_avx.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/opts/SkOpts_avx.cpp b/src/opts/SkOpts_avx.cpp
new file mode 100644
index 0000000000..8802153002
--- /dev/null
+++ b/src/opts/SkOpts_avx.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkOpts.h"
+#define SK_OPTS_NS sk_avx
+#include "SkXfermode_opts.h"
+
+namespace SkOpts {
+ void Init_avx() {
+ create_xfermode = sk_avx::create_xfermode;
+ }
+}
+