overte-Armored-Dragon/tools/qt-builder/patches/win-qtwebengine.diff
2020-12-28 15:54:38 +13:00

67 lines
3.4 KiB
Diff

From 138a7203f16cf356e9d4dac697920a22437014b0 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Fri, 13 Nov 2020 11:09:23 +0100
Subject: [PATCH] Fix build with msvc2019 16.8.0
Fixes: QTBUG-88708
Change-Id: I3554ceec0437801b4861f68edd504d01fc01cf93
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
diff --git a/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp b/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp
index 306cde1..d4f1034 100644
--- a/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp
+++ b/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp
@@ -72,11 +72,11 @@
const RGB9E5Data *inputData = reinterpret_cast<const RGB9E5Data *>(&input);
*red =
- inputData->R * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
+ inputData->R * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
*green =
- inputData->G * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
+ inputData->G * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
*blue =
- inputData->B * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
+ inputData->B * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
}
} // namespace gl
diff --git a/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h
index 78c316e..136c796 100644
--- a/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h
+++ b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h
@@ -130,7 +130,7 @@
// https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation.
FloatPoint3D toXYZ(const FloatPoint3D& lab) const {
auto invf = [](float x) {
- return x > kSigma ? pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f);
+ return x > kSigma ? (float)pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f);
};
FloatPoint3D v = {clamp(lab.X(), 0.0f, 100.0f),
diff --git a/qtwebengine/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h b/qtwebengine/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h
index 02363d0..8860287 100644
--- a/qtwebengine/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h
+++ b/qtwebengine/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h
@@ -198,6 +198,20 @@
return *this;
}
+#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
+ TimestampedTracePiece& operator=(TimestampedTracePiece&& ttp) const
+ {
+ if (this != &ttp) {
+ // First invoke the destructor and then invoke the move constructor
+ // inline via placement-new to implement move-assignment.
+ this->~TimestampedTracePiece();
+ new (const_cast<TimestampedTracePiece*>(this)) TimestampedTracePiece(std::move(ttp));
+ }
+
+ return const_cast<TimestampedTracePiece&>(*this);
+ }
+#endif // PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
+
~TimestampedTracePiece() {
switch (type) {
case Type::kInvalid: