e98f2c
# HG changeset patch
e98f2c
# Parent  acf59ea86dd1d878b43920832093f082dcfc61c0
e98f2c
e98f2c
diff -r acf59ea86dd1 gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp
e98f2c
--- a/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp	Mon Mar 09 08:26:10 2020 +0100
e98f2c
+++ b/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp	Fri Mar 27 13:30:28 2020 +0100
e98f2c
@@ -7,7 +7,7 @@
e98f2c
 
e98f2c
 #include "include/core/SkPaint.h"
e98f2c
 #include "src/shaders/gradients/Sk4fLinearGradient.h"
e98f2c
-
e98f2c
+#include "src/core/SkEndian.h"
e98f2c
 #include <cmath>
e98f2c
 #include <utility>
e98f2c
 
e98f2c
@@ -28,6 +28,9 @@
e98f2c
 
e98f2c
     while (n >= 4) {
e98f2c
         DstTraits<premul>::store4x(c0, c1, c2, c3, dst, bias0, bias1);
e98f2c
+#ifdef SK_CPU_BENDIAN
e98f2c
+        SkEndianSwap32s(dst, 4);
e98f2c
+#endif
e98f2c
         dst += 4;
e98f2c
 
e98f2c
         c0 = c0 + dc4;
e98f2c
@@ -37,12 +40,23 @@
e98f2c
         n -= 4;
e98f2c
     }
e98f2c
     if (n & 2) {
e98f2c
-        DstTraits<premul>::store(c0, dst++, bias0);
e98f2c
-        DstTraits<premul>::store(c1, dst++, bias1);
e98f2c
+        DstTraits<premul>::store(c0, dst, bias0);
e98f2c
+#ifdef SK_CPU_BENDIAN
e98f2c
+        *dst = SkEndianSwap32(*dst);
e98f2c
+#endif
e98f2c
+        ++dst;
e98f2c
+        DstTraits<premul>::store(c1, dst, bias1);
e98f2c
+#ifdef SK_CPU_BENDIAN
e98f2c
+        *dst = SkEndianSwap32(*dst);
e98f2c
+#endif
e98f2c
+        ++dst;
e98f2c
         c0 = c0 + dc2;
e98f2c
     }
e98f2c
     if (n & 1) {
e98f2c
         DstTraits<premul>::store(c0, dst, bias0);
e98f2c
+#ifdef SK_CPU_BENDIAN
e98f2c
+        *dst = SkEndianSwap32(*dst);
e98f2c
+#endif
e98f2c
     }
e98f2c
 }
e98f2c
 
e98f2c