summaryrefslogtreecommitdiffstats
path: root/external/skia/operator-eq-bool.patch.1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/skia/operator-eq-bool.patch.1
parentInitial commit. (diff)
downloadlibreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz
libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/skia/operator-eq-bool.patch.1')
-rw-r--r--external/skia/operator-eq-bool.patch.125
1 files changed, 25 insertions, 0 deletions
diff --git a/external/skia/operator-eq-bool.patch.1 b/external/skia/operator-eq-bool.patch.1
new file mode 100644
index 000000000..d6dc3c139
--- /dev/null
+++ b/external/skia/operator-eq-bool.patch.1
@@ -0,0 +1,25 @@
+diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp
+index 654ab8f97c..e7b3137d8e 100644
+--- a/src/core/SkVM.cpp
++++ b/src/core/SkVM.cpp
+@@ -1173,7 +1173,7 @@ namespace skvm {
+ // Map min channel to 0, max channel to s, and scale the middle proportionally.
+ auto scale = [&](auto c) {
+ // TODO: better to divide and check for non-finite result?
+- return select(sat == 0.0f, 0.0f
++ return select(eq_op(0.0f, sat), 0.0f
+ , ((c - mn) * s) / sat);
+ };
+ *r = scale(*r);
+diff --git a/src/core/SkVM.h b/src/core/SkVM.h
+index db5b273c45..5cf1ebba3c 100644
+--- a/src/core/SkVM.h
++++ b/src/core/SkVM.h
+@@ -882,6 +882,7 @@ namespace skvm {
+ static inline I32 operator==(I32 x, I32 y) { return x->eq(x,y); }
+ static inline I32 operator==(I32 x, int y) { return x->eq(x,y); }
+ static inline I32 operator==(int x, I32 y) { return y->eq(x,y); }
++ static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); }
+
+ static inline I32 operator!=(I32 x, I32 y) { return x->neq(x,y); }
+ static inline I32 operator!=(I32 x, int y) { return x->neq(x,y); }