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