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