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