re-enable PCH for skia
now that our baseline requires Visual Studio 2022. Requires a single patch for a duplicate definition. Change-Id: I16cf2185e8d8d6f2b8a696c24c9897326d7de644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195878 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
Vendored
+2
-2
@@ -14,8 +14,7 @@ $(eval $(call gb_Library_set_warnings_disabled,skia))
|
||||
$(eval $(call gb_Library_use_unpacked,skia,skia))
|
||||
|
||||
$(eval $(call gb_Library_use_clang,skia))
|
||||
#This currently results in all sorts of compile complaints
|
||||
#$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia))
|
||||
$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia))
|
||||
|
||||
$(eval $(call gb_Library_add_defs,skia,\
|
||||
-DSKIA_IMPLEMENTATION=1 \
|
||||
@@ -126,6 +125,7 @@ $(eval $(call gb_Library_set_include,skia,\
|
||||
$$(INCLUDE) \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia/modules/skcms/ \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia/modules/skcms/src/ \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia/third_party/vulkanmemoryallocator/ \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia/third_party/vulkanmemoryallocator/include/ \
|
||||
-I$(gb_UnpackedTarball_workdir)/skia/src/gpu/vk/vulkanmemoryallocator/ \
|
||||
|
||||
+1
@@ -44,6 +44,7 @@ skia_patches := \
|
||||
0004-loong64-Fix-the-remaining-implicit-vector-casts.patch \
|
||||
msvc-unknown-attributes.patch.1 \
|
||||
fix-semaphore-include.patch.1 \
|
||||
pch-duplicate-definition.patch.1 \
|
||||
|
||||
ifneq ($(MSYSTEM),)
|
||||
# use binary flag so patch from git-bash won't choke on mixed line-endings in patches
|
||||
|
||||
+8
-3
@@ -13,7 +13,7 @@
|
||||
manual changes will be rewritten by the next run of update_pch.sh (which presumably
|
||||
also fixes all possible problems, so it's usually better to use it).
|
||||
|
||||
Generated on 2025-09-30 11:36:30 using:
|
||||
Generated on 2025-12-19 10:17:21 using:
|
||||
./bin/update_pch external/skia skia --cutoff=1 --exclude:system --include:module --include:local
|
||||
|
||||
If after updating build fails, use the following command to locate conflicting headers:
|
||||
@@ -137,6 +137,7 @@
|
||||
#include <include/core/SkPath.h>
|
||||
#include <include/core/SkPathBuilder.h>
|
||||
#include <include/core/SkPathEffect.h>
|
||||
#include <include/core/SkPathIter.h>
|
||||
#include <include/core/SkPathMeasure.h>
|
||||
#include <include/core/SkPathTypes.h>
|
||||
#include <include/core/SkPathUtils.h>
|
||||
@@ -196,11 +197,11 @@
|
||||
#include <include/encode/SkEncoder.h>
|
||||
#include <include/encode/SkICC.h>
|
||||
#include <include/encode/SkPngEncoder.h>
|
||||
#include <include/gpu/ganesh/GrDirectContext.h>
|
||||
#include <include/pathops/SkPathOps.h>
|
||||
#include <include/private/SkEncodedInfo.h>
|
||||
#include <include/private/SkExif.h>
|
||||
#include <include/private/SkGainmapInfo.h>
|
||||
#include <include/private/SkHdrMetadata.h>
|
||||
#include <include/private/SkIDChangeListener.h>
|
||||
#include <include/private/SkPathRef.h>
|
||||
#include <include/private/SkSLSampleUsage.h>
|
||||
@@ -283,6 +284,7 @@
|
||||
#include <src/base/SkUtils.h>
|
||||
#include <src/base/SkVx.h>
|
||||
#include <src/base/SkZip.h>
|
||||
#include <src/capture/SkCaptureCanvas.h>
|
||||
#include <src/codec/SkAndroidCodecAdapter.h>
|
||||
#include <src/codec/SkBmpBaseCodec.h>
|
||||
#include <src/codec/SkBmpCodec.h>
|
||||
@@ -349,7 +351,6 @@
|
||||
#include <src/core/SkDevice.h>
|
||||
#include <src/core/SkDistanceFieldGen.h>
|
||||
#include <src/core/SkDraw.h>
|
||||
#include <src/core/SkDrawBase.h>
|
||||
#include <src/core/SkDrawProcs.h>
|
||||
#include <src/core/SkDrawShadowInfo.h>
|
||||
#include <src/core/SkDrawTypes.h>
|
||||
@@ -399,11 +400,13 @@
|
||||
#include <src/core/SkOptsTargets.h>
|
||||
#include <src/core/SkPaintDefaults.h>
|
||||
#include <src/core/SkPaintPriv.h>
|
||||
#include <src/core/SkPathData.h>
|
||||
#include <src/core/SkPathEffectBase.h>
|
||||
#include <src/core/SkPathEnums.h>
|
||||
#include <src/core/SkPathMakers.h>
|
||||
#include <src/core/SkPathMeasurePriv.h>
|
||||
#include <src/core/SkPathPriv.h>
|
||||
#include <src/core/SkPathRaw.h>
|
||||
#include <src/core/SkPathRawShapes.h>
|
||||
#include <src/core/SkPictureData.h>
|
||||
#include <src/core/SkPictureFlat.h>
|
||||
@@ -443,6 +446,7 @@
|
||||
#include <src/core/SkScalerContext.h>
|
||||
#include <src/core/SkScan.h>
|
||||
#include <src/core/SkScanPriv.h>
|
||||
#include <src/core/SkSpanPriv.h>
|
||||
#include <src/core/SkSpecialImage.h>
|
||||
#include <src/core/SkSpriteBlitter.h>
|
||||
#include <src/core/SkStreamPriv.h>
|
||||
@@ -562,6 +566,7 @@
|
||||
#include <src/utils/SkClipStackUtils.h>
|
||||
#include <src/utils/SkDashPathPriv.h>
|
||||
#include <src/utils/SkFloatToDecimal.h>
|
||||
#include <src/utils/SkFloatUtils.h>
|
||||
#include <src/utils/SkJSONWriter.h>
|
||||
#include <src/utils/SkMatrix22.h>
|
||||
#include <src/utils/SkMultiPictureDocumentPriv.h>
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
diff -ur skia.org/src/base/SkCubics.cpp skia/src/base/SkCubics.cpp
|
||||
--- skia.org/src/base/SkCubics.cpp 2025-12-19 10:21:59.576434800 +0200
|
||||
+++ skia/src/base/SkCubics.cpp 2025-12-19 10:25:13.020232200 +0200
|
||||
@@ -148,7 +148,7 @@
|
||||
return foundRoots;
|
||||
}
|
||||
|
||||
-static bool approximately_zero(double x) {
|
||||
+bool lcl_approximately_zero(double x) {
|
||||
// This cutoff for our binary search hopefully strikes a good balance between
|
||||
// performance and accuracy.
|
||||
return std::abs(x) < 0.00000001;
|
||||
@@ -174,7 +174,7 @@
|
||||
static double binary_search(double A, double B, double C, double D, double start, double stop) {
|
||||
SkASSERT(start <= stop);
|
||||
double left = SkCubics::EvalAt(A, B, C, D, start);
|
||||
- if (approximately_zero(left)) {
|
||||
+ if (lcl_approximately_zero(left)) {
|
||||
return start;
|
||||
}
|
||||
double right = SkCubics::EvalAt(A, B, C, D, stop);
|
||||
@@ -189,7 +189,7 @@
|
||||
for (int i = 0; i < maxIterations; i++) {
|
||||
double step = (start + stop) / 2;
|
||||
double curr = SkCubics::EvalAt(A, B, C, D, step);
|
||||
- if (approximately_zero(curr)) {
|
||||
+ if (lcl_approximately_zero(curr)) {
|
||||
return step;
|
||||
}
|
||||
if ((curr < 0 && left < 0) || (curr > 0 && left > 0)) {
|
||||
@@ -229,8 +229,8 @@
|
||||
double root = binary_search(A, B, C, D, regions[startIndex], regions[startIndex + 1]);
|
||||
if (root >= 0) {
|
||||
// Check for duplicates
|
||||
- if ((foundRoots < 1 || !approximately_zero(solution[0] - root)) &&
|
||||
- (foundRoots < 2 || !approximately_zero(solution[1] - root))) {
|
||||
+ if ((foundRoots < 1 || !lcl_approximately_zero(solution[0] - root)) &&
|
||||
+ (foundRoots < 2 || !lcl_approximately_zero(solution[1] - root))) {
|
||||
solution[foundRoots++] = root;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user