-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elements artist port #12
Comments
skia uses gtk which is not suitable for plugins, plus gtk uses GPL as its license which does not allow self-contained proprietary plugins (using LGPL means we would need gtk to be a shared lib, not static lib, but that breaks plugins) so we need to rely on the old cairo based code. |
I mean it uses gtk on linux, not an issue on other systems where it integrates with the OS level APIs. |
Actually, I spoke with the core contributor of elements and they said that it is planned to move away from gtk, so I guess it will be possible once it will be done |
gtk comes from skia, not from elements. or is the idea to not use skia after all? I think the initial idea from them was that cairo was unmaintained, but that is no longer the case. they already spent quite some time on the skia port, so hard to imagine they will move away from it. or maybe you mean skia might not use gtk at some point? |
I spoke more with them and I got told that gtk does not come from skia |
oh errr that is even worse then. skia uses gtk on linux, so then on the elements artistic branch they also directly call into gtk? that would solve one issue if they move on to use something else, but then there is still skia making use of gtk that becomes a problem. |
seems I was wrong, skia does not use gtk, seems it does not do any event/windows handling? so then elements and dpf could potentially work assuming they limit their gtk use. dpf already provides the event handling and window creation, we take out that part away from the elements code and inject our own. |
AFAIR: elements uses a 2d drawing engine to paint their widgets on a surface (via cairo or artist) and take care of the event handling providing a native widget toolkit based event loop implementation. Artist is an own drawing engine interface that works on top of different backends: skia for linux and windows and quartz on macOS. So elements requires what they call a host (the backend of the underlying widget toolkit) to paint their widget elements on top of it via drawing engine (win32 HWND, cocoa NSWindow or GdkWindow). What was done with sfizz initially was to replace the GTK implementation with a custom host using PUGL, but due some issues was replaced later with VSTGUI. |
correct, and this is already what happens. as long as the elements API allow to have a custom "host" implementation, DPF can hook into that and provide all the custom event and window handling. this is what the current branch on this repo does, based on pugl cairo code. for going with skia/artist branch of elements, we need to implement skia surface support into pugl, so it gives us a skia context to write into. but this shouldn't be much of a problem as from what I can see it will be a similar approach to what cairo is doing, just using a little different API. |
OK, so I think that is where collaboration/contribution should start: by providing a |
dgl is part of dpf though, so we would get into a circular dependency if we include dgl on elements side. the target is the other way around, have elements provide a generic host interface and we keep the dgl/dpf implementation here, vendoring whatever is necessary for such builds for a 1-stop solution |
Back to this, I recall that also jpcima had to deal with circular dependency, but IDK what you mean with generic, AFAIK the elements host implementation should know the widget/window type used by dgl, like as example it does with gtk. |
I mean I do not want to have elements depend on dpf in other to use it, the dependency order should be the other way around. So a dedicated dpf widget would depend-on/use elements which then does not have any other dependency back to dpf. We can have this by having a generic/dummy/stub like interface on elements side, which implements hooks to get the platform level stuff done. |
Hi,
I am pretty satisfied by the new possibilities opened by the port of elements for dpf, however I notice that the version that got ported is the cairo version which isn't the most efficient performance wise. The artist port branch of Elements uses Skia for rendering which is more efficient since it relies on OpenGL
https://github.com/cycfi/elements/tree/artist_port
I'm wondering how hard it would be to update the port to use the skia version instead ?
The text was updated successfully, but these errors were encountered: