| Index: src/opts/SkPMFloat_sse.h
|
| diff --git a/src/opts/SkPMFloat_sse.h b/src/opts/SkPMFloat_sse.h
|
| index 016644e0524255ed7a65918cf2753ad7ed28bb7d..28aa90bf29fd8d4913417f8111d92f1bc9b23448 100644
|
| --- a/src/opts/SkPMFloat_sse.h
|
| +++ b/src/opts/SkPMFloat_sse.h
|
| @@ -5,7 +5,9 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -SK_ALWAYS_INLINE SkPMFloat::SkPMFloat(SkPMColor c) {
|
| +namespace { // See SkPMFloat.h
|
| +
|
| +inline SkPMFloat::SkPMFloat(SkPMColor c) {
|
| SkPMColorAssert(c);
|
| #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3
|
| const int _ = 255; // Zero these bytes.
|
| @@ -20,7 +22,7 @@
|
| SkASSERT(this->isValid());
|
| }
|
|
|
| -SK_ALWAYS_INLINE SkPMColor SkPMFloat::round() const {
|
| +inline SkPMColor SkPMFloat::round() const {
|
| // We don't use _mm_cvtps_epi32, because we want precise control over how 0.5 rounds (up).
|
| __m128 scaled = _mm_mul_ps(_mm_set1_ps(255), fVec);
|
| __m128i fix8_32 = _mm_cvttps_epi32(_mm_add_ps(_mm_set1_ps(0.5f), scaled)),
|
| @@ -31,7 +33,9 @@
|
| return c;
|
| }
|
|
|
| -SK_ALWAYS_INLINE Sk4f SkPMFloat::alphas() const {
|
| +inline Sk4f SkPMFloat::alphas() const {
|
| static_assert(SK_A32_SHIFT == 24, "");
|
| return _mm_shuffle_ps(fVec, fVec, 0xff); // Read as 11 11 11 11, copying lane 3 to all lanes.
|
| }
|
| +
|
| +} // namespace
|
|
|