aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-03-24 09:47:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-24 09:47:12 -0700
commit4b65059e6eea7d90ff3547e4656f7659d3815dc4 (patch)
treef0b436ef426ecc4b484246d319fc5cc96336c6b9 /src
parentc207f9b2e8d6fb5386197fa8a8d258d2c4603418 (diff)
Go back to storeAligned / LoadAligned for SkPMFloat <->Sk4f.
This seems to fix the miscompilation bug on ARM64 / Release / GCC 4.9. We switched this over originally for perf issues with NEON, but I can't see any now. Will keep an eye out. BUG=skia:3570 Review URL: https://codereview.chromium.org/1026403002
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPMFloat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkPMFloat.h b/src/core/SkPMFloat.h
index 699f85b2c4..010974debe 100644
--- a/src/core/SkPMFloat.h
+++ b/src/core/SkPMFloat.h
@@ -38,8 +38,8 @@ public:
SkPMFloat& operator=(const SkPMFloat& that);
// Freely autoconvert between SkPMFloat and Sk4f. They're always byte-for-byte identical.
- /*implicit*/ SkPMFloat(const Sk4f& fs) { *(Sk4f*)this = fs; }
- /*implicit*/ operator Sk4f() const { return *(const Sk4f*)this; }
+ /*implicit*/ SkPMFloat(const Sk4f& fs) { fs.storeAligned(fColor); }
+ /*implicit*/ operator Sk4f() const { return Sk4f::LoadAligned(fColor); }
float a() const { return fColor[SK_A32_SHIFT / 8]; }
float r() const { return fColor[SK_R32_SHIFT / 8]; }