[tizen] Re-enable PDF backend on Tizen (#4155)#4156
Closed
mattleibow wants to merge 1 commit into
Closed
Conversation
The m150 update disabled the PDF backend on Tizen (skia_enable_pdf=false) as a stopgap: m150's PDF backend uses C++20 defaulted three-way comparison (operator<=>) and defaulted operator==, which need <compare> and a C++20 stdlib, but Tizen Studio's clang 10 + gcc 9.2 libstdc++ (tizen-8.0 rootstrap) predate C++20. Rather than an ABI-breaking Tizen platform bump, the skia fork backports the PDF backend's C++20 constructs to equivalent C++17 (mono/skia "[skiasharp] Backport PDF three-way comparison to C++17 for Tizen"). With that in place PDF compiles on the existing clang-10 toolchain, so: - bump the externals/skia submodule to the fork commit carrying the C++17 backport, and - drop the skia_enable_pdf=false stopgap from native/tizen/build.cake. This restores SKDocument PDF support on Tizen. SK_SUPPORT_PDF and -std=c++2a were already set in the Tizen project_def.prop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4156PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4156"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4156/packages --name skiasharp-pr-4156More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4156 |
Contributor
Author
|
Folding into #4146 per coordination: mono/skia #255 (the C++17 PDF backport) is now merged into the skia-sync/m150 fork branch (tip 391fb705). The #4146 session will re-pin externals/skia to that tip and drop the skia_enable_pdf=false stopgap, so no PDF regression ships and #4155 is resolved by #4146. Closing this stacked PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4146 (
skia-sync/m150). Fixes #4155.Background
The m150 update disabled the PDF backend on Tizen (
skia_enable_pdf=falseinnative/tizen/build.cake) as a stopgap. m150's PDF backend uses C++20 defaulted three-way comparison (operator<=>) and defaultedoperator==, which require<compare>and a C++20 stdlib. Tizen Studio's clang 10 + gcc 9.2 libstdc++ (tizen-8.0 rootstrap) predate C++20 —<compare>is missing and clang 10 crashes parsing the defaulted spaceship (ADO build 158198).Approach
Rather than an ABI-breaking Tizen platform bump (Tizen ≤9.0 all ship gcc 9.2 libstdc++; only Tizen 10.0 moves to gcc 14.2), the Skia fork backports the PDF backend's C++20 constructs to equivalent C++17. With that in place PDF compiles on the existing clang-10 toolchain — no toolchain/container change, no min-OS bump, no native ABI break.
Changes
externals/skiato the fork commit carrying the C++17 backport — depends on mono/skia Create a "simple" picture view #255 ([skiasharp] Backport PDF three-way comparison to C++17 for Tizen).skia_enable_pdf=falsefromnative/tizen/build.cake, restoringSKDocumentPDF support on Tizen.SK_SUPPORT_PDFand-std=c++2awere already set in the Tizenproject_def.prop.The fork backport replaces, in
src/pdf/SkPDFTypes.handsrc/pdf/SkPDFTag.cpp:operator<=>onSkPDFIndirectReference/SkPDFParentTreeKey/ContentIndex→ explicit==,!=,<,<=,>,>=;operator==onContentSpan::Data/ContentSpan→ explicit equality;<compare>/<ranges>(thestd::views::reversewas already replaced with a reverse-iterator loop in the parent m150 commit for WASM).Verified across all 48
src/pdffiles that these were the only C++20 usages.Validation
Tizen native can't be built on macOS; validation is via CI (
native_tizen_x64_windows,native_tizen_arm64_windows) — they must compile PDF and pass.Merge order
skia-sync/m150(fork)