summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-19 07:47:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-19 08:36:16 +0200
commitdbdc14dfd90c40b6cc0cd951be236acd85ff4cea (patch)
tree6b7252d3e72fcd03c9b52e3a41ecb005cc9900d9
parentb2e511cb46c1f318803050d3a47e7a296ade04a0 (diff)
external/skia: Adapt to C++20 rewritten equality comparisons
...by avoiding the selection of rewritten ones that would use synthesized operator== with non-bool return type: > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1317:37: error: return type 'skvm::I32' of selected 'operator==' function for rewritten '==' comparison is not 'bool' > select(s == 0.0f , d * (1-src.a) > ~ ^ ~~~~ > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1217:17: note: in instantiation of function template specialization 'skvm::Builder::blend(SkBlendMode, skvm::Color, skvm::Color)::(anonymous class)::operator()<skvm::F32, skvm::F32>' requested here > fn(src.r, dst.r), > ^ > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1311:43: note: in instantiation of function template specialization 'skvm::Builder::blend(SkBlendMode, skvm::Color, skvm::Color)::(anonymous class)::operator()<(lambda at workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1311:44)>' requested here > return apply_rgb_srcover_a([&](auto s, auto d) { > ^ > workdir/UnpackedTarball/skia/src/core/SkVM.h:912:23: note: declared here > static inline I32 operator==(float x, F32 y) { return y->eq(x,y); } > ^ (There are more such operators here that could cause similar issues, but I only adapted the one that caused the overall build of LibreOffice to fail.) Change-Id: Ib880191f8bfa44dacb65692e27f32d2e62a96371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--external/skia/UnpackedTarball_skia.mk1
-rw-r--r--external/skia/c++20.patch.010
2 files changed, 11 insertions, 0 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index c4a248610ce4..1ac4c9b24061 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -36,6 +36,7 @@ skia_patches := \
windows-typeface-directwrite.patch.0 \
windows-raster-surface-no-copies.patch.1 \
fix-windows-dwrite.patch.1 \
+ c++20.patch.0 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/c++20.patch.0 b/external/skia/c++20.patch.0
new file mode 100644
index 000000000000..167c8d89c92d
--- /dev/null
+++ b/external/skia/c++20.patch.0
@@ -0,0 +1,10 @@
+--- src/core/SkVM.h
++++ src/core/SkVM.h
+@@ -909,6 +909,7 @@
+ static inline F32 max(float x, F32 y) { return y->max(x,y); }
+
+ static inline I32 operator==(F32 x, F32a y) { return x->eq(x,y); }
++ static inline I32 operator==(F32 x, float y) { return x->eq(x,y); }
+ static inline I32 operator==(float x, F32 y) { return y->eq(x,y); }
+ static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); }
+