M135 public#311
Merged
Merged
Conversation
…0.38.2-7619-gfb519f2fe5)
…0.38.2-7849-g6c2dc3e74e)
…rewritten to give old behavior. m135: Use the new built-in callback SkPDF::JPEG::MetadataWithCallbacks as default constructor for SkPDF::Metadata; 2nd part of SkPDF::MakeDocument() breakage. m135: Fixes the 3rd SkPDF::MakeDocument(SkWStream*) constructor which uses DictToMetadata. Fixes skia-python#310 The m135 release note is misleading. `SkPDF::MakeDocument(SkWStream*)` is not deprecated (works with warning or works but not recommended for new code), but it now throws an error: Python 3.13.2 (main, Feb 4 2025, 00:00:00) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> import skia ... import pytest ... >>> stream = skia.DynamicMemoryWStream() >>> document = skia.PDF.MakeDocument(stream) ../../src/pdf/SkPDFDocument.cpp:713: fatal error: "Must set both a jpegDecoder and jpegEncoder to create PDFs" Milestone 135 ------------- * `SkPDF::MakeDocument(SkWStream*)` [one argument] has been deprecated and will be removed. This is because SkPDFMetdata has added 2 required fields `jpegDecoder` and `jpegEncoder`. In order to make a reasonable PDF, those must be supplied (using the two argument factory). To make these easier to supply `include/docs/SkPDFJpegHelpers.h` has been added, which will use Skia's built-in jpeg encoder and decoder.
…ates warning). Mistakenly added a while ago
…0.38.2-7854-gb99f146a03)
Merged
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.
The main breakage is #310 - and this includes a fix. I have replaced the "bare" constructors with the more useful one, but now we need to think about what to do with the bare one, and whether to provide them somehow. Have two months to think about this until m136.