• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kivy / kivy / 25338915925 / 1
59%
master: 59%

Build:
DEFAULT BRANCH: master
Ran 04 May 2026 07:38PM UTC
Files 323
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2026 07:28PM UTC coverage: 56.119% (-1.4%) from 57.507%
25338915925.1

push

github

web-flow
Add internal ThorVG Cython wrapper (kivy.lib.thorvg) (#9297)

* Add internal ThorVG Cython wrapper (kivy.lib.thorvg)

Introduce kivy/lib/thorvg/ as an internal Cython binding to ThorVG v1.0.4,
in preparation for replacing the external `thorvg-python` dependency used
by the unmerged SVG / SVG-image / Lottie feature branches. ThorVG is
linked statically on all desktop platforms; no separate kivy-deps wheel
is shipped.

Wrapper surface (minimal - only what the three providers need):

* Paint / Picture with ownership-aware __dealloc__ and set_opacity / id
* SwCanvas with zero-copy Python buffer protocol for GPU upload
  (Texture.blit_buffer consumes this directly - see bench below)
* Accessor for SVG element-id traversal using ThorVG 1.0.4's native
  accessible-mode API (removes the XML-fallback the feature branches
  previously carried)
* LottieAnimation with frame / segment / marker / slot / quality controls
* Engine initialised exactly once on module import (SW, threads=0)

Build wiring (setup.py):

* c_options['use_thorvg'], auto-enabled if headers+lib are discoverable
* determine_thorvg_flags() with KIVY_THORVG_{INCLUDE,LIB}_DIR env-var
  overrides and KIVY_DEPS_ROOT/dist fallback
* TVG_STATIC defined, C++ runtime linked on darwin / unix; compiled as
  C++ (language='c++')

Tests + benchmarks (skip-if-unavailable, no SDL3/GStreamer needed):

* kivy/tests/test_thorvg_wrapper.py - 23 unit tests covering engine
  version, canvas / picture / accessor / animation lifecycle, buffer
  allocation, ownership transfer on Canvas.add, and callback exception
  safety
* kivy/tests/bench_thorvg_wrapper.py - 6 micro-benchmarks; crucially a
  matched pair (memoryview vs bytes) that makes the ~45x zero-copy win
  of the buffer protocol visible and regression-guards against providers
  falling back to bytes(canvas) on the hot path

Lightweight CI gate (.github/workflows/test_thorvg_wrapper.yml) + helpers
(.ci/thorvg_wrapper_*.py): builds ThorVG v1.0.4 statically with
M... (continued)

2912 of 6223 branches covered (46.79%)

25358 of 45186 relevant lines covered (56.12%)

0.56 hits per line

Source Files on job 25338915925.1
  • Tree
  • List 323
  • Changed 44
  • Source Changed 1
  • Coverage Changed 44
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25338915925
  • 5ca6e4f7 on github
  • Prev Job for on master (#24103802626.1)
  • Next Job for on master (#25338985556.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc