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