Repository navigation
Conversation
emaciel10
marked this pull request as ready for review
October 14, 2026 19:47
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.
When a path combines a solid fill with a shading-pattern stroke (
BorB*), the inner half of the gradient outline disappears.ProcessPathPattern()paints the pattern stroke beforeDrawPath()paints the solid fill, so the fill covers that half of the stroke.Defer the pattern stroke until after the remaining fill has been painted. Preserve the stroke-only path by drawing the deferred pattern when no ordinary fill/stroke work remains.
The change includes a three-page synthetic PDF template and an embedder regression test. The template uses a 10-point red-to-blue gradient stroke around a white rectangle, with
B,B*, and a stroke-onlyScontrol. The test samples both halves of the outline and the white interior at 1, 2, and 4 pixels per point. It requires no fonts or customer artwork. The PR contains C++ and a text PDF template; no WASM payload is committed.Validation
testing/tools/fixup_pdf_template.py.@embedpdf/pdfium2.15.1, native revision73a041a5c1aaffa09ebb64f1981ff501cb91a41c, and a locally available rebuilt 2.15.1 WASM with this same paint-order change.BandB*at every scale; the outer half remains colored.Scontrol passes on both binaries.git diff --checkpasses.Current
embedpdf/mainhas not been rebuilt locally. This checkout lacks the native depot_tools/GN/Ninja setup, so the new C++ embedder test and full native suites are not claimed as passed. The unchanged faultyProcessPath()sequence is present at baseed2f716e5381e34f096cc1e50e4259a55998d391. Please run the current-head AGG/Skia render checks before merging. This is a draft for native validation and review.Targeted native check after configuring/building the project:
autoninja -C out/Debug pdfium_embeddertests out/Debug/pdfium_embeddertests --gtest_filter='FPDFRenderPatternEmbedderTest.ShadingStrokePaintsAfterSolidFill'Release request
Could this also be backported to
embedpdf/v2and released through the maintained@embedpdf/pdfium2.15.x package? The aim is to consume the official package instead of carrying an application-owned native binary. A fix only in the newer runtime would leave v2 consumers with the existing defect.This is a native PDFium rendering correction rather than a wrapper change. I would also welcome guidance on taking the change through PDFium's Gerrit/CLA process, or a maintainer-led upstream port.