Removed OSMesa, replaced with BUILD_BACKEND_HEADLESS_SOFTWARE - #252
Closed
kerberjg wants to merge 1 commit into
Closed
Removed OSMesa, replaced with BUILD_BACKEND_HEADLESS_SOFTWARE#252kerberjg wants to merge 1 commit into
kerberjg wants to merge 1 commit into
Conversation
kerberjg
force-pushed
the
feature/backend-headless-software
branch
2 times, most recently
from
June 25, 2026 19:43
e4922f8 to
72022d6
Compare
OSMesa is deprecated and no longer a viable headless rendering path.
Replace the headless EGL backend (which required libosmesa6, libgles2,
and libegl1) with a zero-dependency headless mode built on the existing
SoftwareBackend (Flutter kSoftware renderer, NoneSink by default).
New CMake flag: BUILD_BACKEND_HEADLESS_SOFTWARE
- Mutually exclusive with all other backends (same as BUILD_BACKEND_SOFTWARE)
- Forces BUILD_SOFTWARE_SINK_DRM, BUILD_SOFTWARE_SINK_FBDEV, and
BUILD_SOFTWARE_INPUT_LIBINPUT OFF; no system library deps required
- No OSMesa/EGL/Wayland linkage: IVI_HAVE_EGL and waypp include gates
no longer include the headless case; waypp subproject is not built
SoftwareBackend gains a `const bool is_headless` constructor parameter:
- Ctor: rejects hardware sinks (NativeSize() != nullopt) in headless
mode, swapping them for NoneSink with a warning
- GetVsyncCallback(): returns nullptr in headless mode (no vblank source)
- SetCursor(): no-op in headless mode (no display to composite onto)
- CreateSurface(): trace-logs the no-op in headless mode
- New GetSink() accessor exposes the active sink for in-process pixel
capture (used by the reworked getViewRenderBuf API)
flutter_view.cc constructs SoftwareBackend with is_headless=true under
BUILD_BACKEND_HEADLESS_SOFTWARE, using MakeSinkFromEnv() so test fixtures
can set IVI_SW_SINK=memory to enable pixel capture without recompiling.
App::getViewRenderBuf() is reimplemented via MemorySink::SnapshotLatest(),
returning std::vector<uint8_t> with row_bytes/height out-params instead of
a raw GLubyte* into an OSMesa framebuffer.
kerberjg
force-pushed
the
feature/backend-headless-software
branch
from
June 25, 2026 23:06
72022d6 to
abf1a7a
Compare
kerberjg
marked this pull request as ready for review
June 25, 2026 23:28
Contributor
|
@kerberjg There seems to be some confusion. e.g. These are the software sinks as documented in Supported Software Sinks
Hold off on this PR until further notice. Major changes are incoming. |
Collaborator
Author
|
@jwinarske Yeah, that looks like something my Claude spat out. Thanks for the correction! Please note this one is blocking for #239 |
Contributor
|
closing in favor of #254 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OSMesa is removed from Mesa 25.1+ and no longer a viable headless rendering path.
This PR replaces the headless EGL backend (which required libosmesa6, libgles2, and libegl1) with a zero-dependency headless mode built on the existing SoftwareBackend (Flutter kSoftware renderer, NoneSink by default).
New CMake flag:
BUILD_BACKEND_HEADLESS_SOFTWAREBUILD_BACKEND_SOFTWARE)BUILD_SOFTWARE_SINK_DRM,BUILD_SOFTWARE_SINK_FBDEV, andBUILD_SOFTWARE_INPUT_LIBINPUTOFF; no system library deps requiredSoftwareBackend gains a
const bool is_headlessconstructor parameter:flutter_view.cc constructs SoftwareBackend with
is_headless=trueunderBUILD_BACKEND_HEADLESS_SOFTWARE, usingMakeSinkFromEnv()so test fixtures can set IVI_SW_SINK=memory to enable pixel capture without recompiling.App::getViewRenderBuf()is reimplemented viaMemorySink::SnapshotLatest(), returningstd::vector<uint8_t>with row_bytes/height out-params instead of a rawGLubyte*into an OSMesa framebuffer.Also - all references to OSMesa are removed.