diff options
author | mtklein <mtklein@chromium.org> | 2015-05-22 17:18:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-22 17:18:21 -0700 |
commit | aa999cb952753d373c03befa7fce8c4700ef9308 (patch) | |
tree | 187820613cb390da6f4ce7aca7e4da08eab31f69 /src/opts/Sk4px_none.h | |
parent | d23a395d519835f78630aaea3f2a2c30ecdffe87 (diff) |
Everyone gets a namespace {}.
If we include Sk4px.h, SkPMFloat.h, or SkNx.h into files with different
SIMD flags, that could cause different definitions of the same method.
Normally that's moot, because all the code inlines, but in Debug it tends not
to. So in Debug, the linker picks one definition for us. That breaks _someone_.
Wrapping everything in a namespace {} keeps the definitions separate.
Tested locally, it fixes this bug.
BUG=skia:3861
This code is not yet enabled in Chrome, so shouldn't affect the roll.
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/1154523004
Diffstat (limited to 'src/opts/Sk4px_none.h')
-rw-r--r-- | src/opts/Sk4px_none.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opts/Sk4px_none.h b/src/opts/Sk4px_none.h index 541443d772..d3ead31491 100644 --- a/src/opts/Sk4px_none.h +++ b/src/opts/Sk4px_none.h @@ -7,6 +7,8 @@ #include "SkUtils.h" +namespace { // See Sk4px.h + static_assert(sizeof(Sk4px) == 16, "This file uses memcpy / sk_memset32, so exact size matters."); inline Sk4px::Sk4px(SkPMColor px) { @@ -94,3 +96,4 @@ inline Sk4px Sk4px::zeroColors() const { 0,0,0, this->kth<15>()); } +} // namespace |