aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TessellatingPathRendererTests.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-08-23 11:11:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-23 17:25:26 +0000
commitcd71f115a846332d95b29fbeed3f315d8c01753d (patch)
treed8c1b2eec555fe1bd9204d7867ad7c5bf1d5cbc3 /tests/TessellatingPathRendererTests.cpp
parent59a62ed9462efa58573594da0f0088bba37960af (diff)
make SkOpts functions inline, not static
When Skia's built with an interestingly advanced instruction set baseline like SSSE3 or SSE4.1, we end up with two distinct copies of some SkOpts functions, one default in SkOpts.o and one specialization from SkOpts_{ssse3,sse41}.o. These functions are static, and so are technically unrelated, even though they're the same code compiled with the same instructions available. They're going to be identical. What we want here is to remove static but mark them as inline instead. In this case inline means "if the linker sees multiple copies of this, that's cool, just pick any one arbitrarily". That's just what we want. Now, when I disassemble a binary before and after this change, I do see the redundant routines removed. However, the file size change is minimal... I suspect that this must mean the linker has noticed that we had identical code and physically folded the two logically independent routines. I don't know how prevalent this optimization is, though, so it doesn't hurt to give it more of a "one copy please" hint with inline. There may also be a difference here between the binary size (~unchanged) and the in-memory layout of that binary? Change-Id: Id9c8f0ffc84aa1c9a066c22b623d34adab281857 Reviewed-on: https://skia-review.googlesource.com/37501 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tests/TessellatingPathRendererTests.cpp')
0 files changed, 0 insertions, 0 deletions