>> > btw, I suppose you checked your DBus changes against the WIP "qemu-display" project. What was your experience? I don't think many people have tried it yet. Do you think this could be made to work on macOS? at least the non-dmabuf support should work, as long as Gtk4 has good macOS support. I don't know if dmabuf or similar exist there, any idea?
>>
>> I tested it on Fedora. I think it would probably work on macOS but
>> maybe require some tweaks. IOSurface is a counterpart of DMA-BUF in
>> macOS but its situation is bad; it must be delivered via macOS's own
>> IPC mechanisms (Mach port and XPC), but they are for server-client
>> model and not for P2P. fileport mechanism allows to convert Mach port
>> to file descriptor, but it is not documented. (In reality, I think all
>> of the major browsers, Chromium, Firefox and Safari use fileport for
>> this purpose. Apple should really document it if they use it for their
>> app.) It is also possible to share IOSurface with a global number, but
>> it can be brute-forced and is insecure.
>>
>
> Thanks, the Gtk developers might have some clue. They have been working on improving macOS support, and it can use opengl now (https://blogs.gnome.org/chergert/2020/12/15/gtk-4-got-a-new-macos-backend-now-with-opengl/).
They don't need IPC for passing textures so that is a different story.
Yes but they have web-engine and video decoding concerns (beside qemu/dmabuf gtk display they should be aware of). I'll try to reach Christian about it.
fwiw, here is Christian Hergert comment about texture sharing & gtk on macos:
"There is, and we are using it in GTK 4 as of 4.6 to render from OpenGL
to a surface we can attach to CALayers or OpenGL textures. It has
allowed us to do a bunch of tricks to ensure we have opaque surfaces
since NSWindow doesn't have anything like set_opaque_region() from Wayland.
It's called IOSurface and the browsers use this to pass rendererings
between processes."