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