-
Notifications
You must be signed in to change notification settings - Fork 10
Get this working everywhere #1
Description
The goal of this crate is to have a quick-and-dirty way to throw pixels into a buffer and display them on a window without a significant number of dependencies. Potentially, we'll be able to use this in the Winit examples to clear the screen quickly and get windows showing up with Wayland, but that would require that this work on all the platforms Winit supports.
@vbogaevsky @murarth @vberger @ryanisaacg @mtak- @goddessfreya - would any of you be able to throw together an implementation for the platform you've worked on in Winit? It's totally fine if you're unable or uninterested in working on this, and I have no desire to thrust work onto any of you that you don't want to do. However, you're the people I know I can ping, which seems like a good place to start for getting movement on this crate.
Anyhow, assorted implementation details:
- I have no idea if the current public API will work on all platforms. There's a good chance it won't, but figuring that out will be part of the design process.
- This crate doesn't depend on Winit directly - instead, it depends on
raw-window-handle. That works fine on Windows, but there may be some friction on other platforms - particularly X11, which uses a#[doc(hidden)]API to load up Winit's X11 bindings. We should be able to resolve that problem by moving the X11-bindings-loading code into a separate crate that creates alazy_staticbindings object, which both Winit and winit-blit can depend upon.- That X11 work will be necessary for decoupling Glutin from Winit, which we should do in the long term. Getting this crate working should help lay the groundwork for figuring out how to do that.
- Ideally, this shouldn't be too complex to implement for the various platforms - the Windows implementation is about 250 lines, and the majority of that code is API boilerplate that can be copied to other platforms.
Let me know if there are any questions. Thanks!