Add a thin wrapper around Skia's PDF backend #775
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.
Skia has a convenient PDF backend that turns draw calls into PDF pages. It would be amazing to have access to that backend in Skiko too.
This changeset adds a direct wrapper around Skia's PDF API. I left out the following features:
SkPDF::Metadata::fStructureElementTreeRoot
together withSkPDF::SetNodeId
, which make up an API for adding semantic annotations to elements in the PDF. I deemed this not useful enough to justify the cost of implementing it at this point.SkPDF::Metadata::fExecutor
, which is an experimental API for multithreading the creation of PDFs. As Skiko doesn't support theSkExecutor
yet, adding this would have incurred high cost for possibly little reward.SkPDF::Metadata::fSubsetter
, which allows to choose between two font subsetters, one of which is already deprecated and will thus likely be removed by the Skia team in the near future.SkDocument::abort
, which just waits for all background threads to terminate and then returns. This seems non-useful and even confusing because we don't support PDF multithreading.In contrast to my color space changeset, where I wrote POJOs to mirror the existing codebase, I now decided to employ data classes. If you for some reason want to avoid data classes in Skiko, just tell me, and I'll refactor them back to POJOs.
I'm looking forward to your comments.