Skip to content

Conversation

@HinTak
Copy link
Collaborator

@HinTak HinTak commented Jan 20, 2026

This should build and run tests until #350 . The breakage in #354 turns out to be quite big - needs to do 5 reversions, some quite large.

HinTak added 30 commits June 25, 2025 17:58
…, and removed.

It was deprecated in m139, and gone in m140.

Milestone 139
-------------
  * `SkFontMgr_New_FontConfig` with 1 parameter has been deprecated and will be removed in a future
    release. Clients will need to call the other version providing an SkFontScanner (e.g.
    `SkFontScanner_Make_FreeType()`)

Conflicts:
	src/skia/Font.cpp
…favor of the `SkRecorder*` version.

Milestone 140
-------------
  * `SkImage::isValid(GrRecordingContext*)` has been deprecated in favor of the `SkRecorder*` version.
    To migrate do something like `image->isValid(ctx->asRecorder())`.

    `SkImage::makeSubset(GrDirectContext*, ...)` has been deprecated in favor of the `SkRecorder*`
    version. To migrate, do something like `image->makeSubset(ctx->asRecorder, ..., {})`

    `SkImage::makeColorSpace(GrDirectContext*, ...)` has been deprecated in favor of the `SkRecorder*`
    version. To migrate, do something like `image->makeColorSpace(ctx->asRecorder, ..., {})`

    `SkImage::makeColorTypeAndColorSpace(GrDirectContext*, ...)` has been deprecated in favor of the
    `SkRecorder*` version. To migrate, do something like
    `image->makeColorTypeAndColorSpace(ctx->asRecorder, ..., {})`

    In the case you are working with CPU-backed images, `skcpu::Recorder::TODO()` should work until
    a `skcpu::Context` and `skcpu::Recorder` can be used properly.
…atrix.inverse()

m139:
    bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count);
m140:
    bool setPolyToPoly(SkSpan<const SkPoint> src, SkSpan<const SkPoint> dst);

Before m140, only (deprecated):
    [[nodiscard]] bool invert(SkMatrix* inverse) const;
Added in m140:
    std::optional<SkMatrix> invert() const;
Old:
    bool getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, bool startWithMoveTo);
Newly added:
    bool getSegment(SkScalar startD, SkScalar stopD, SkPathBuilder* dst, bool startWithMoveTo);
Old:
    bool transform(const SkMatrix& matrix, SkRRect* dst) const;
Newly added:
    std::optional<SkRRect> transform(const SkMatrix& matrix) const;
Old:
    bool getBoundaryPath(SkPath* path) const;
Newly added:
    SkPath getBoundaryPath() const;
was:
    bool applyToPath(SkPath* dst, const SkPath& src) const;
m140:
    bool applyToPath(SkPathBuilder* dst, const SkPath& src) const;
This reverts commit cd8af0c.

Should not be needed in m140.
HinTak added 30 commits December 8, 2025 19:57
Upstream making SkPath immutable at m143 is going to break a lot of user code.
Try to revert the change locally for now.

Fixes kyamagu#354
commit c501c727a00796f7b8a269680e41304155bc0b16
Author: Michael Reed <mike@reedtribe.org>
Date:   Sat Oct 11 12:13:47 2025 -0400

    Can we remove SK_SUPPORT_LEGACY_APPLYPERSPECTIVECLIP

    Change-Id: I332cd3dae1584812768445388482f92df0d65324
    Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1072416
    Reviewed-by: Florin Malita <fmalita@google.com>
    Reviewed-by: Eric Boren <borenet@google.com>
    Reviewed-by: Kaylee Lubick <kjlubick@google.com>
    Commit-Queue: Mike Reed <mike@reedtribe.org>

m143: &SkPath::transform with SkApplyPerspectiveClip withdrawn with SK_SUPPORT_LEGACY_APPLYPERSPECTIVECLIP

m143: &SkMatrix::mapRect with SkApplyPerspectiveClip withdrawn with SK_SUPPORT_LEGACY_APPLYPERSPECTIVECLIP

In m142, SkApplyPerspectiveClip is not used by either (a not-used argument), and supported by extra
SK_SUPPORT_LEGACY_APPLYPERSPECTIVECLIP. This was removed in m143.
diff between m142 and m143, include/core/SkPath.h:

-    static SkPath Rect(const SkRect&, SkPathDirection = SkPathDirection::kDefault,
+    static SkPath Rect(const SkRect&, SkPathFillType, SkPathDirection = SkPathDirection::kDefault,
                        unsigned startIndex = 0);
+    static SkPath Rect(const SkRect& r, SkPathDirection direction = SkPathDirection::kDefault,
+                       unsigned startIndex = 0) {
+        return Rect(r, SkPathFillType::kDefault, direction, startIndex);
+    }
diff include/core/SkPath.h between m142 and m143:

-    bool contains(SkScalar x, SkScalar y) const;
+    bool contains(SkPoint point) const;
+
+    // deprecated
+    bool contains(SkScalar x, SkScalar y) const {
+        return this->contains({x, y});
+    }
See actions/runner-images#13046
macOS 13 is fully unsupported by December 4th 2025 for GitHub.
Hunk kyamagu#2 for "BUILD.gn" needs extra identation of 2 spaces in m143.
diff between m143 and m144 of include/svg/SkSVGCanvas.h:

+    static std::unique_ptr<SkCanvas> Make(const SkRect& bounds, SkWStream*, Options opts);
+#if !defined(SK_DISABLE_LEGACY_SVG_FACTORIES)
     static std::unique_ptr<SkCanvas> Make(const SkRect& bounds, SkWStream*, uint32_t flags = 0);
+#endif
--- skia-m143/include/gpu/ganesh/gl/GrGLBackendSurface.h	2025-12-08 00:11:34.000000000 +0000
+++ skia-m144/include/gpu/ganesh/gl/GrGLBackendSurface.h	2025-12-08 00:15:16.000000000 +0000
@@ -20,8 +20,14 @@
 namespace skgpu { enum class Mipmapped : bool; }

 namespace GrBackendFormats {
+
+// DEPRECATED: Prefer MakeGL(format) for GL_TEXTURE_2D targets and MakeGLExternal() for
+// GL_TEXTURE_EXTERNAL targets.
 SK_API GrBackendFormat MakeGL(GrGLenum format, GrGLenum target);

+SK_API GrBackendFormat MakeGL(GrGLenum format); // For GL_TEXTURE_2D textures
+SK_API GrBackendFormat MakeGLExternal();        // For GL_TEXTURE_EXTERNAL textures
+
 SK_API GrGLFormat AsGLFormat(const GrBackendFormat&);
 SK_API GrGLenum AsGLFormatEnum(const GrBackendFormat&);
 }  // namespace GrBackendFormats
…everse-apply to m144 cleanly.

Reversing "defines.remove('SK_DISABLE_LEGACY_NONCONST_SERIAL_PROCS')" also is likely strictly-speaking
incorrect: what we want is really removing the 'defines.remove("SK_HIDE_PATH_EDIT_METHODS")' line
while keeping the rest. It likely does not matter.
SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA is gone in m144:

--- skia-m144/include/core/SkImage.h	2025-12-08 00:15:16.000000000 +0000
+++ skia-m145/include/core/SkImage.h	2026-01-18 04:38:15.000000000 +0000
@@ -739,11 +739,7 @@

         example: https://fiddle.skia.org/c/@Image_refEncodedData
     */
-#if defined(SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA)
     sk_sp<const SkData> refEncodedData() const;
-#else
-    sk_sp<SkData> refEncodedData() const;
-#endif

     struct RequiredProperties {
         bool fMipmapped = false;
…pendFloatArray

The prototype has changed:

-    void appendFloatArray(const char* owner,
-                          const char* name,
-                          const std::vector<float>& value);
+    void appendFloatArray(const char* owner, const char* name, SkSpan<const float> value);

commit 9cd8adae4d5253da322f04ceef1dafaa3e6847a8
Author: Ben Wagner <bungeman@google.com>
Date:   Wed Jan 7 15:23:18 2026 -0500

    [pdf] Value owning AttributeList::appendTextString

    The existing appendTextString is efficient in that it does not make a
    copy of the `value` string, but also add a version that takes an
    SkString so that ownership can be passed.

    Change appendFloatArray and appendNodeIdArray to take SkSpan instead of
    std::vector&.

    Document that for all `const char*` parameters the attribute will hold
    the pointer and not make a copy and for how long the pointer must remain
    valid. Document that all other information is copied into the attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant