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