Skip to content

Commit eb47516

Browse files
authored
Merge pull request skia-python#358 from HinTak/m144-public-cleaned
M144 public cleaned
2 parents 9ffb045 + 39e8169 commit eb47516

60 files changed

Lines changed: 700 additions & 2487 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-22.04, windows-2022, macos-13]
18+
os: [ubuntu-22.04, windows-2022, macos-15-intel]
1919
arch: [auto64]
20-
cp: ["cp3{10,11,12,13}"]
20+
cp: ["cp3{10,11,12,13,14}"]
2121
include:
22-
- os: macos-13
22+
- os: macos-14
2323
arch: arm64
24-
cp: "cp3{10,11,12,13}"
24+
cp: "cp3{10,11,12,13,14}"
2525
- os: ubuntu-22.04-arm
2626
arch: aarch64
27-
cp: "cp3{10,11,12,13}"
27+
cp: "cp3{10,11,12,13,14}"
2828
- os: windows-11-arm
2929
arch: ARM64
30-
cp: "cp3{11,12,13}"
30+
cp: "cp3{11,12,13,14}"
3131

3232
steps:
3333
- uses: actions/checkout@v4
@@ -66,11 +66,11 @@ jobs:
6666
strategy:
6767
fail-fast: false
6868
matrix:
69-
os: [ubuntu-22.04, windows-2022, macos-13]
69+
os: [ubuntu-22.04, windows-2022, macos-15-intel]
7070
arch: [auto64]
7171
cp: ["cp3{8,9}"]
7272
include:
73-
- os: macos-13
73+
- os: macos-14
7474
arch: arm64
7575
cp: "cp3{8,9}"
7676
- os: ubuntu-22.04-arm
@@ -127,6 +127,7 @@ jobs:
127127
- name: Build docs
128128
run: |
129129
# installing libegl1 will also install libegl-mesa0
130+
sudo apt-get -y update
130131
sudo apt-get -y install libegl1
131132
python -m pip install --pre -f dist skia-python
132133
python -m pip install sphinx sphinx-rtd-theme
@@ -174,8 +175,13 @@ jobs:
174175
submodules: recursive
175176
- run: bash scripts/build_Linux.sh
176177
- run: python -m build --wheel
178+
- uses: actions/upload-artifact@v4
179+
with:
180+
name: wheel-fedora-42
181+
path: ./dist/*.whl
177182
- run: python -m pip install dist/*.whl
178183
- run: python -m pip install moderngl
184+
- run: python -c 'import skia; print(skia.__version__)'
179185
- run: python -c 'import moderngl; moderngl_context = moderngl.create_standalone_context(backend="egl"); import skia; interface = skia.GrGLInterface.MakeEGL() ; assert isinstance(skia.GrDirectContext.MakeGL(interface), skia.GrContext) ; print("Success3")'
180186
- run: eglinfo || /bin/true
181187
- run: xvfb-run -s "-screen 0 640x480x24" glxinfo

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Binary package is available on PyPI:
1515
pip install skia-python
1616
```
1717

18-
Supported platforms: Python 3.8-3.13 (CPython) on
18+
Supported platforms: Python 3.8-3.14 (CPython) on
1919

2020
- Linux x86_64, aarch64
2121
- macOS x86_64, arm64
22-
- Windows x86_64, arm64 ; arm64 for the windows 11 and Python 3.11-3.13 combination only.
22+
- Windows x86_64, arm64 ; arm64 for the windows 11 and Python 3.11-3.14 combination only.
2323

2424
**IMPORTANT:** Starting v87.9rc1 / v138.0rc1, `libEGL.so` (from mesa-libEGL, libglvnd, or your graphic
2525
card's vendor e.g. NVidia) is required to be present on Linux hosts. This is associated
@@ -74,7 +74,9 @@ https://kyamagu.github.io/skia-python
7474
[README.m129](relnotes/README.m129.md), [README.m130](relnotes/README.m130.md), [README.m131](relnotes/README.m131.md),
7575
[README.m132](relnotes/README.m132.md), [README.m133](relnotes/README.m133.md), [README.m134](relnotes/README.m134.md),
7676
[README.m135](relnotes/README.m135.md), [README.m136](relnotes/README.m136.md), [README.m137](relnotes/README.m137.md),
77-
[README.m138](relnotes/README.m138.md).
77+
[README.m138](relnotes/README.m138.md), [README.m139](relnotes/README.m139.md), [README.m140](relnotes/README.m140.md),
78+
[README.m141](relnotes/README.m141.md), [README.m142](relnotes/README.m142.md), [README.m143](relnotes/README.m143.md),
79+
[README.m144](relnotes/README.m144.md).
7880

7981
## Contributing
8082

docs/tutorial/canvas.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The following example uses glfw package to create an OpenGL context. Install
7979
8080
.. code-block:: python
8181
82+
import sys
8283
import skia
8384
import glfw
8485
import contextlib
@@ -134,7 +135,7 @@ Here's a complete example:
134135

135136
.. code-block:: python
136137
137-
import contextlib, glfw, skia
138+
import sys, contextlib, glfw, skia
138139
from OpenGL import GL
139140
140141
WIDTH, HEIGHT = 640, 480

patch/0001-Disable-OpenGL-for-Windows-on-ARM64.patch

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ index ef913e9..33f3208 100644
3333
sources += [ "src/gpu/ganesh/gl/GrGLMakeNativeInterface_none.cpp" ]
3434
}
3535
@@ -2185,10 +2187,10 @@ if (skia_enable_tools) {
36-
"tools/gpu/gl/win/SkWGL.h",
37-
"tools/gpu/gl/win/SkWGL_win.cpp",
38-
]
39-
- libs += [
40-
- "Gdi32.lib",
41-
- "OpenGL32.lib",
42-
- ]
43-
+ libs += [ "Gdi32.lib" ]
44-
+ if (target_cpu != "arm64") {
45-
+ libs += [ "OpenGL32.lib" ]
46-
+ }
36+
"tools/ganesh/gl/win/SkWGL.h",
37+
"tools/ganesh/gl/win/SkWGL_win.cpp",
38+
]
39+
- libs += [
40+
- "Gdi32.lib",
41+
- "OpenGL32.lib",
42+
- ]
43+
+ libs += [ "Gdi32.lib" ]
44+
+ if (target_cpu != "arm64") {
45+
+ libs += [ "OpenGL32.lib" ]
46+
+ }
47+
}
4748
}
48-
}
4949

5050
diff --git b/src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp a/src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp
5151
index f33f2e1..da3cbe2 100644
@@ -70,26 +70,26 @@ index f33f2e1..da3cbe2 100644
7070
+#endif // ARM64
7171
+
7272
#endif // SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE
73-
diff --git b/tools/gpu/gl/win/SkWGL_win.cpp a/tools/gpu/gl/win/SkWGL_win.cpp
73+
diff --git b/tools/ganesh/gl/win/SkWGL_win.cpp a/tools/ganesh/gl/win/SkWGL_win.cpp
7474
index 4cb462b..ac2d700 100644
75-
--- b/tools/gpu/gl/win/SkWGL_win.cpp
76-
+++ a/tools/gpu/gl/win/SkWGL_win.cpp
75+
--- b/tools/ganesh/gl/win/SkWGL_win.cpp
76+
+++ a/tools/ganesh/gl/win/SkWGL_win.cpp
7777
@@ -6,7 +6,7 @@
7878
*/
7979

8080
#include "include/core/SkTypes.h"
8181
-#if defined(SK_BUILD_FOR_WIN) && !defined(WINUWP)
8282
+#if defined(SK_BUILD_FOR_WIN) && !defined(_M_ARM64) && !defined(WINUWP)
8383

84-
#include "tools/gpu/gl/win/SkWGL.h"
84+
#include "tools/ganesh/gl/win/SkWGL.h"
8585

86-
diff --git b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
86+
diff --git b/tools/ganesh/gl/win/CreatePlatformGLTestContext_win.cpp a/tools/ganesh/gl/win/CreatePlatformGLTestContext_win.cpp
8787
index cb62daf..0d29da7 100644
88-
--- b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
89-
+++ a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
88+
--- b/tools/ganesh/gl/win/CreatePlatformGLTestContext_win.cpp
89+
+++ a/tools/ganesh/gl/win/CreatePlatformGLTestContext_win.cpp
9090
@@ -8,6 +8,16 @@
9191

92-
#include "tools/gpu/gl/GLTestContext.h"
92+
#include "tools/ganesh/gl/GLTestContext.h"
9393

9494
+#if defined(_M_ARM64)
9595
+
@@ -103,7 +103,7 @@ index cb62daf..0d29da7 100644
103103
+
104104
#include <windows.h>
105105
#include <GL/GL.h>
106-
#include "tools/gpu/gl/win/SkWGL.h"
106+
#include "tools/ganesh/gl/win/SkWGL.h"
107107
@@ -221,3 +231,4 @@ GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
108108
}
109109
} // namespace sk_gpu_test
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
From f352da2d607fffd2629ba408d1c9fb0da8c49c60 Mon Sep 17 00:00:00 2001
2+
From: Kaylee Lubick <kjlubick@google.com>
3+
Date: Fri, 24 Oct 2025 14:25:24 -0700
4+
Subject: [PATCH] Reland "Make SkPath immutable on GN build"
5+
6+
This reverts commit a01eb11751829966ffe9925388e47f85ce585870.
7+
8+
Reason for revert: CanvasKit updated, PathKit deleted, WasmGM tests disabled
9+
10+
Original change's description:
11+
> Revert "Make SkPath immutable on GN build"
12+
>
13+
> This reverts commit 832f6e513d41ec0b268dc1596169312b37f7a182.
14+
>
15+
> Reason for revert: Breaking Ubuntu builds
16+
>
17+
> Original change's description:
18+
> > Make SkPath immutable on GN build
19+
> >
20+
> > Our clients don't use our GN files directly, so we can set the
21+
> > define here and it should not bleed into those builds.
22+
> >
23+
> > Change-Id: Ia991a3075d2f551d8b264b1629548e21f0cbe303
24+
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1074076
25+
> > Auto-Submit: Kaylee Lubick <kjlubick@google.com>
26+
> > Reviewed-by: Eric Boren <borenet@google.com>
27+
> > Commit-Queue: Eric Boren <borenet@google.com>
28+
>
29+
> No-Presubmit: true
30+
> No-Tree-Checks: true
31+
> No-Try: true
32+
> Change-Id: If5b99e4b73506bc5f31a189f0a9c3462486642bb
33+
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1078196
34+
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
35+
> Commit-Queue: Thomas Smith <thomsmit@google.com>
36+
37+
Change-Id: I6caa8371ca86eeb51d8406bad9586f341ffac1e0
38+
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084436
39+
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
40+
Commit-Queue: Kaylee Lubick <kjlubick@google.com>
41+
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
42+
---
43+
BUILD.gn | 3 +++
44+
gn/gn_to_bp.py | 7 ++++++-
45+
2 files changed, 9 insertions(+), 1 deletion(-)
46+
47+
diff --git a/BUILD.gn b/BUILD.gn
48+
index 0fd3c5f93d..7645bf3dca 100644
49+
--- a/BUILD.gn
50+
+++ b/BUILD.gn
51+
@@ -23,6 +23,9 @@ config("skia_public") {
52+
defines = [
53+
"SK_CODEC_DECODES_BMP",
54+
"SK_CODEC_DECODES_WBMP",
55+
+
56+
+ # TODO(kjlubick,fmalita) Remove when clients updated and APIs deleted.
57+
+ "SK_HIDE_PATH_EDIT_METHODS",
58+
]
59+
cflags_objcc = []
60+
if (is_component_build) {
61+
diff --git a/gn/gn_to_bp.py b/gn/gn_to_bp.py
62+
index 24195d2eea..2bbe758676 100755
63+
--- a/gn/gn_to_bp.py
64+
+++ b/gn/gn_to_bp.py
65+
@@ -771,7 +771,13 @@ here = os.path.dirname(__file__)
66+
defs = gn_to_bp_utils.GetArchSources(os.path.join(here, 'opts.gni'))
67+
68+
def get_defines(json):
69+
- return {str(d) for d in json['targets']['//:skia']['defines']}
70+
+ defines = {str(d) for d in json['targets']['//:skia']['defines']}
71+
+ # TODO(kjlubick, fmalita) Add this back in to enforce Android doesn't
72+
+ # use these methods anymore.
73+
+ defines.remove("SK_HIDE_PATH_EDIT_METHODS")
74+
+ defines.remove('SK_DISABLE_LEGACY_NONCONST_SERIAL_PROCS')
75+
+ return defines
76+
+
77+
android_defines = get_defines(js)
78+
linux_defines = get_defines(js_linux)
79+
mac_defines = get_defines(js_mac)
80+
--
81+
2.52.0
82+

0 commit comments

Comments
 (0)