Skip to content

[tizen] Re-enable PDF backend on Tizen (#4155)#4156

Closed
mattleibow wants to merge 1 commit into
skia-sync/m150from
mattleibow/reenable-tizen-pdf
Closed

[tizen] Re-enable PDF backend on Tizen (#4155)#4156
mattleibow wants to merge 1 commit into
skia-sync/m150from
mattleibow/reenable-tizen-pdf

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Stacked on #4146 (skia-sync/m150). Fixes #4155.

Background

The m150 update disabled the PDF backend on Tizen (skia_enable_pdf=false in native/tizen/build.cake) as a stopgap. m150's PDF backend uses C++20 defaulted three-way comparison (operator<=>) and defaulted operator==, 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

  • Bump externals/skia to 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).
  • Drop skia_enable_pdf=false from native/tizen/build.cake, restoring SKDocument PDF support on Tizen. SK_SUPPORT_PDF and -std=c++2a were already set in the Tizen project_def.prop.

The fork backport replaces, in src/pdf/SkPDFTypes.h and src/pdf/SkPDFTag.cpp:

  • defaulted operator<=> on SkPDFIndirectReference / SkPDFParentTreeKey / ContentIndex → explicit ==,!=,<,<=,>,>=;
  • defaulted operator== on ContentSpan::Data / ContentSpan → explicit equality;
  • drops <compare>/<ranges> (the std::views::reverse was already replaced with a reverse-iterator loop in the parent m150 commit for WASM).

Verified across all 48 src/pdf files 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

  1. mono/skia Create a "simple" picture view #255skia-sync/m150 (fork)
  2. [skia-sync] Update skia to milestone 150 #4146 finalizes its submodule pin (will then include the backport)
  3. this PR (or fold the one-line stopgap removal into [skia-sync] Update skia to milestone 150 #4146)

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>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

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 -- 4156

PowerShell / 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-4156
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4156

@mattleibow

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant