From a156a8ffbe1342a9c329e66ad1438934ac309d70 Mon Sep 17 00:00:00 2001 From: mtklein Date: Fri, 3 Apr 2015 06:16:13 -0700 Subject: Use switch operator[](int) to kth() so we can use vget_lane. #floats BUG=skia: BUG=skia:3592 Review URL: https://codereview.chromium.org/1059743002 --- src/core/SkPMFloat.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/SkPMFloat.h') diff --git a/src/core/SkPMFloat.h b/src/core/SkPMFloat.h index 84c05ea762..b2d9480b81 100644 --- a/src/core/SkPMFloat.h +++ b/src/core/SkPMFloat.h @@ -38,10 +38,10 @@ public: /*implicit*/ SkPMFloat(const Sk4f& fs) { fColors = fs; } /*implicit*/ operator Sk4f() const { return fColors; } - float a() const { return fColors[SK_A32_SHIFT / 8]; } - float r() const { return fColors[SK_R32_SHIFT / 8]; } - float g() const { return fColors[SK_G32_SHIFT / 8]; } - float b() const { return fColors[SK_B32_SHIFT / 8]; } + float a() const { return fColors.kth(); } + float r() const { return fColors.kth(); } + float g() const { return fColors.kth(); } + float b() const { return fColors.kth(); } // N.B. All methods returning an SkPMColor call SkPMColorAssert on that result before returning. -- cgit v1.2.3