-
Notifications
You must be signed in to change notification settings - Fork 171
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
anvil/udev: Dynamic support for pixman rendererer #1497
base: master
Are you sure you want to change the base?
Conversation
I tried to create a wrapper enum implementing the renderer traits. Macro based implementation: https://github.com/cmeissl/smithay/blob/3834756520cfb8db5c21b9b5485d16bdc7cdab6e/src/backend/renderer/auto.rs |
I was thinking a macro might make sense. That looks handy. Although macro rules macros like that get a bit complicated. |
Updated on top of #1600. Testing this I see a crash:
I guess that's an existing issue with the pixman renderer, and not something changed here? Hm. |
Updated so the Exactly how best to abstract over multiple renderers remains an open question. |
This removes a bit of duplication between backends. There seems to be no need to separate these unless fps is used for other things.
The `RendererRef` and `Texture` enums provide one way to abstract over different renderers. This splits `FpsElement` into a seperate `Fps` that isn't a render element, and isn't specific to one renderer/texture type.
This seems to be working correctly, including with the We may want to change how renderers are abstracted dynamically in the future (and provide some helper for this in Smithay), but this seems good for now, to have a way to test Pixman rendering properly. |
With the changes here, the anvil udev backend will use pixman for rendering if
ANVIL_USE_PIXMAN
is set.To do:
Send
bound onMemoryRenderBuffer
, and noSend
forPixmanTexture
debug
feature (need to abstract texture)It's not entirely clear how best to abstract renderers dynamically:
Renderer
trait?Renderer
and related traits make it easier to abstract over, and dispatch at runtime to different renderers?