Index: src/opts/SkPMFloat_sse.h |
diff --git a/src/opts/SkPMFloat_sse.h b/src/opts/SkPMFloat_sse.h |
index 28aa90bf29fd8d4913417f8111d92f1bc9b23448..016644e0524255ed7a65918cf2753ad7ed28bb7d 100644 |
--- a/src/opts/SkPMFloat_sse.h |
+++ b/src/opts/SkPMFloat_sse.h |
@@ -5,9 +5,7 @@ |
* found in the LICENSE file. |
*/ |
-namespace { // See SkPMFloat.h |
- |
-inline SkPMFloat::SkPMFloat(SkPMColor c) { |
+SK_ALWAYS_INLINE SkPMFloat::SkPMFloat(SkPMColor c) { |
SkPMColorAssert(c); |
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 |
const int _ = 255; // Zero these bytes. |
@@ -22,7 +20,7 @@ inline SkPMFloat::SkPMFloat(SkPMColor c) { |
SkASSERT(this->isValid()); |
} |
-inline SkPMColor SkPMFloat::round() const { |
+SK_ALWAYS_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)), |
@@ -33,9 +31,7 @@ inline SkPMColor SkPMFloat::round() const { |
return c; |
} |
-inline Sk4f SkPMFloat::alphas() const { |
+SK_ALWAYS_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 |