skia: add a patch to correct use of max function
previously, it error out with no matching function found
This commit is contained in:
13
mingw-w64-skia/0006-fix-std-max.patch
Normal file
13
mingw-w64-skia/0006-fix-std-max.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
|
||||
index 90c64a4..8b54ce9 100644
|
||||
--- a/src/ports/SkFontHost_win.cpp
|
||||
+++ b/src/ports/SkFontHost_win.cpp
|
||||
@@ -1073,7 +1073,7 @@ void SkScalerContext_GDI::RGBToA8(const SkGdiRGB* SK_RESTRICT src, size_t srcRB,
|
||||
for (int i = 0; i < width; i++) {
|
||||
dst[i] = rgb_to_a8<APPLY_PREBLEND>(src[i], table8);
|
||||
if constexpr (kSkShowTextBlitCoverage) {
|
||||
- dst[i] = std::max(dst[i], 10u);
|
||||
+ dst[i] = std::max<unsigned int>(dst[i], 10u);
|
||||
}
|
||||
}
|
||||
src = SkTAddOffset<const SkGdiRGB>(src, srcRB);
|
||||
@@ -38,6 +38,7 @@ source=("${_realname}-${pkgver}.tar.gz::https://github.com/google/skia/archive/$
|
||||
"0003-fix-dwrite-function-mingw.patch"
|
||||
"0004-add-mingw-toolchain-build.patch"
|
||||
"0005-dont-undef-CLSID_WICImagingFactory-on-mingw.patch"
|
||||
"0006-fix-std-max.patch"
|
||||
"harfbuzz.gn"
|
||||
"icu.gn"
|
||||
"zlib.gn"
|
||||
@@ -51,6 +52,7 @@ sha256sums=('48ff8b020d2e54b97ddf7cfc54bb483492aef3dc7b3e61629c8a86bc89995643'
|
||||
'76592221a23555a29debc77df7e2429d52e2b7db1c103e0785bb7a4c669b9e03'
|
||||
'63f35c12168fcb5f025db2cb3a4bc693cb4546ce561dc95e45d10c1579daf786'
|
||||
'7883ff95984f5eac3002d8205257666f38538e0907046ef17e4850a36103a12c'
|
||||
'96b98caea6c426ff0b4f85ced7b45d4b40777396ac7b12bb6490b9d387c1b3c8'
|
||||
'7bd0b8cff2f1ec6822c74b731664007f598c3b442718060c499df7ba19141563'
|
||||
'36d32b737f87a676f5c4da9b7ae14193e6c1913ddb6508b979effdba2b80ea83'
|
||||
'b99874ea904724911528a5530c14f3051c358805bd36df9d205df31458ebf8b9'
|
||||
@@ -85,6 +87,7 @@ prepare() {
|
||||
apply_patch_with_msg 0002-add-mingw-toolchain-skia.patch
|
||||
apply_patch_with_msg 0003-fix-dwrite-function-mingw.patch
|
||||
apply_patch_with_msg 0005-dont-undef-CLSID_WICImagingFactory-on-mingw.patch
|
||||
apply_patch_with_msg 0006-fix-std-max.patch
|
||||
cp "${srcdir}/harfbuzz.gn" "${srcdir}/skia/third_party/harfbuzz/BUILD.gn"
|
||||
cp "${srcdir}/icu.gn" "${srcdir}/skia/third_party/icu/BUILD.gn"
|
||||
cp "${srcdir}/zlib.gn" "${srcdir}/skia/third_party/zlib/BUILD.gn"
|
||||
|
||||
Reference in New Issue
Block a user