sknx refactoring
authormtklein <mtklein@chromium.org>
Tue, 9 Feb 2016 18:35:27 +0000 (10:35 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Feb 2016 18:35:28 +0000 (10:35 -0800)
commite4c0beed744d09dae4757c1893d8caa64ee09cd2
tree0e35dcab1c2ab7a1b75609c6dd1dd11231a572eb
parentf1d415188ffb4c34e2886c2cfceb363a148333f1
sknx refactoring

  - trim unused specializations (Sk4i, Sk2d) and apis (SkNx_dup)
  - expand apis a little
    * v[0] == v.kth<0>()
    * SkNx_shuffle can now convert to different-sized vectors, e.g. Sk2f <-> Sk4f
  - remove anonymous namespace

I believe it's safe to remove the anonymous namespace right now.
We're worried about violating the One Definition Rule; the anonymous namespace protected us from that.

In Release builds, this is mostly moot, as everything tends to inline completely.
In Debug builds, violating the ODR is at worst an inconvenience, time spent trying to figure out why the bot is broken.

Now that we're building with SSE2/NEON everywhere, very few bots have even a chance about getting confused by two definitions of the same type or function.  Where we do compile variants depending on, e.g., SSSE3, we do so in static inline functions.  These are not subject to the ODR.

I plan to follow up with a tedious .kth<...>() -> [...] auto-replace.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683543002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1683543002
src/core/SkColorMatrixFilterRowMajor255.cpp
src/core/SkNx.h
src/opts/SkNx_neon.h
src/opts/SkNx_sse.h
src/opts/SkXfermode_opts.h
tests/SkNxTest.cpp