Vendor media_kit_video 2.0.1 with the X11/EGL fix (hardware rendering on X11 with Flutter >= 3.38)
ci / core (push) Successful in 28s
ci / server (push) Successful in 51s
ci / updater-windows (push) Failing after 5m59s

Flutter >= 3.38 keeps its EGL contexts on the raster thread, so
media_kit's video output found none on the platform thread and fell
back to software rendering (no shaders, ~5 fps) on X11. The patched
output opens Flutter's EGL display itself, steps GDK's GLX context aside
on X11 and releases its own context. Patch from a friend's agent, kept
in third_party/media_kit_video/starsync/. Wayland/NVIDIA still renders
on the GPU (checked); the X11 path was verified on the friend's machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-16 01:13:14 +03:00
1 parent 25b19f2d6a
commit a87ee98faa
131 files changed
+15532 -6

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# Starsync's copy of media_kit_video
Upstream: `media_kit_video` 2.0.1 from pub.dev (media-kit/media-kit, MIT,
see ../LICENSE), vendored because upstream has not released since
December 2025. The `example/` folder is left out.
Patches (apply with `patch -p7` from the package root, as recorded):
- `egl-platform-display.patch`: Flutter >= 3.38 keeps its EGL contexts on
the raster thread, so nothing is current on the platform thread where
the video output is created and media_kit fell back to software
rendering (no shaders, slow). The output now opens Flutter's EGL display
itself (eglGetPlatformDisplayEXT on the GDK X11/Wayland display) with
Flutter's config attributes; on X11 it steps GDK's GLX context aside
while its EGL context is in use (libglvnd refuses EGL on a thread
holding GLX), and releases its context instead of leaving it current.
Written by a friend's agent from a real X11 failure.
To update: copy the new upstream version over this folder (minus
`example/`), re-apply the patches, run the app under X11
(`GDK_BACKEND=x11`) and Wayland.