Skip to content

M145 public#357

Open
HinTak wants to merge 101 commits intokyamagu:mainfrom
HinTak:m145-public
Open

M145 public#357
HinTak wants to merge 101 commits intokyamagu:mainfrom
HinTak:m145-public

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 14 commits December 9, 2025 00:35
--- 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 <[email protected]>
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.
Hin-Tak Leung and others added 15 commits February 27, 2026 00:33
…Format and VkImageLayout

Signed-off-by: Hin-Tak Leung <[email protected]>
src/skia/Matrix.cpp:1562:13: error: return type 'Tuple<int, int>' must match previous return type
      'Tuple<float &, float &>' when lambda expression has unspecified explicit return type
 1562 |             return py::make_tuple(-1, -1);
      |             ^
1 error generated.

Signed-off-by: Hin-Tak Leung <[email protected]>
Revert "Make artefacts available even when pytest fails."

This reverts commit a057e3c.
The name of the patch was auto-generated from its content
(and the change has indeed been applied once, reverted, and relanded upstream)
from `git format-patch -1 ...`. IMHO it should be kept as is, and
the content should not be converted to forward-apply. I'll just remove
the "-Reland" part to make copilot happier.
Most of them done programmatically with something like:
    perl -pi -e 's/\&pts\[0\]/pts.data()/g' skia/*

Copilot points out that the latter is safer. Many(all?) of them were
touched by the recent SkSpan changes, plus a few more.
The example code in the Canvas Creation section of the tutorial requires the `sys` module to run correctly, but the `import sys` statement was missing.

This change adds the import sys to resolve the error.
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.

2 participants