Retry trim another instruction off SkRasterPipeline overhead
authorMike Klein <mtklein@chromium.org>
Wed, 4 Jan 2017 16:04:01 +0000 (11:04 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 4 Jan 2017 20:58:21 +0000 (20:58 +0000)
commit464e6a1b5a0598eb1805fa6c11f515466346704f
tree840901b5324c6c28397acc39ec93094cc7d0ebb5
parent07792b218e1cf31c42611276d597fcc99677d391
Retry trim another instruction off SkRasterPipeline overhead

This time, with manual program memory management instead of std::vector<void*>.

Using STL types from SkOpts_hsw.cpp is not safe.  Things like std::vector<void*>
are inlined but not anonymous, so they're deduped by the linker arbitrarily.  This
is bad when we pick the version compiled with AVX instructions on a machine that
doesn't support AVX...

std::vector<Stage> was safe before because Stage itself was anonymous.  While not anonymous, std::vector<Stage> is unique to the compilation unit, because you can only refer to the anonymous Stage in the compilation unit.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_asan_rel_ng;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I015e27583b6b6ff06b5e9f63e3f40ee6b27d6dbd
Reviewed-on: https://skia-review.googlesource.com/6550
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
src/opts/SkOpts_hsw.cpp
src/opts/SkRasterPipeline_opts.h