Go to file
Mike Klein cd71f115a8 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>
2017-08-23 17:25:26 +00:00
animations
bench Revert "Switched highp float to highfloat and mediump float to half." 2017-08-17 15:08:17 +00:00
bin add a Win/Clang build bot 2017-07-31 19:53:51 +00:00
debugger Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
dm Plumb GrContextOptions to GPU sinks in DM 2017-08-21 23:07:08 +00:00
docs fix links and missing constructor 2017-08-04 17:25:24 +00:00
example Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
experimental Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
fuzz Switch SkSL to std::string 2017-08-14 21:24:55 +00:00
gm Fix artifacts on tiny stroked paths scaled up a lot. 2017-08-23 13:54:25 +00:00
gn Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""" 2017-08-22 21:36:40 +00:00
include Add an (optional) SkTaskGroup to GrContext 2017-08-23 14:33:25 +00:00
infra Update Mac CPU tasks to 10.12. 2017-08-23 14:21:56 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources Move lang to list in Android font manager. 2017-08-14 19:29:05 +00:00
samplecode Replace SkFAIL with SK_ABORT. 2017-08-16 15:37:54 +00:00
site Remove examples of now removed SkArcToPathEffect. 2017-08-16 18:38:15 +00:00
src make SkOpts functions inline, not static 2017-08-23 17:25:26 +00:00
tests Add an (optional) SkTaskGroup to GrContext 2017-08-23 14:33:25 +00:00
third_party Make haveDecodedRow return void 2017-08-22 19:36:48 +00:00
tools Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""" 2017-08-22 21:36:40 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore clang on windows support 2017-07-31 18:39:23 +00:00
.gn
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn Reland "skia: add heif decoding support" 2017-08-18 14:40:29 +00:00
codereview.settings
CONTRIBUTING
CQ_COMMITTERS
DEPS Roll skia/third_party/externals/angle2/ 96f6adfa8..e3d8628d1 (1 commit) 2017-08-23 15:12:26 +00:00
Doxyfile
LICENSE
PRESUBMIT.py Update CQ extra trybots after switch to Debian 2017-06-29 19:35:40 +00:00
public.bzl remove SK_SUPPORT_LEGACY_LOCAL_ROTATE_SHADER -- see what breaks 2017-08-21 16:41:26 +00:00
README
README.chromium
whitespace.txt Revert "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp"" 2017-07-19 12:17:34 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.