diff options
author | 2015-05-22 17:18:21 -0700 | |
---|---|---|
committer | 2015-05-22 17:18:21 -0700 | |
commit | aa999cb952753d373c03befa7fce8c4700ef9308 (patch) | |
tree | 187820613cb390da6f4ce7aca7e4da08eab31f69 /src/opts/SkPMFloat_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/SkPMFloat_none.h')
-rw-r--r-- | src/opts/SkPMFloat_none.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opts/SkPMFloat_none.h b/src/opts/SkPMFloat_none.h index 50f242749a..9bb584ed86 100644 --- a/src/opts/SkPMFloat_none.h +++ b/src/opts/SkPMFloat_none.h @@ -5,6 +5,8 @@ * found in the LICENSE file. */ +namespace { // See SkPMFloat.h + inline SkPMFloat::SkPMFloat(SkPMColor c) { *this = SkPMFloat::FromARGB(SkGetPackedA32(c), SkGetPackedR32(c), @@ -62,3 +64,5 @@ inline void SkPMFloat::RoundClampTo4PMColors( colors[2] = c.roundClamp(); colors[3] = d.roundClamp(); } + +} // namespace |