Skip to content

Dicussion : Refactor the winit crate module#29

Merged
vmarcella merged 11 commits into
mainfrom
ahlawat/winit-refactor
Oct 9, 2022
Merged

Dicussion : Refactor the winit crate module#29
vmarcella merged 11 commits into
mainfrom
ahlawat/winit-refactor

Conversation

@KaranAhlawat
Copy link
Copy Markdown
Contributor

This draft PR serves as a discussion log for proceedings on what the goals of the refactor are and how it should generally be carried out in actionable steps.

The primary goal as of now is to refactor the module to use the builder pattern, same as the gfx-hal refactoring.

Refactored the name of `EventLoopPublisher` in the winit crate module,
to simply `LoopPublisher`, keeping in line with the other abstraction,
`Loop`.
1. Add a LoopBuilder for consistency.
2. Add a WindowHandleBuilder
3. Add from method in LoopPublisher
4. Add TODOS to remove/review changes, and older functions.
Comment thread crates/lambda-platform/src/winit/mod.rs Outdated
Comment thread crates/lambda-platform/src/winit/mod.rs Outdated
Comment thread crates/lambda-platform/src/winit/mod.rs Outdated
Comment thread crates/lambda-platform/src/winit/mod.rs Outdated
@KaranAhlawat
Copy link
Copy Markdown
Contributor Author

Should we modify the WindowHandleBuilder to take in a loop for a new instance, and then handle creating WindowProperties within the impl itself? We could move the logic of acquiring MonitorHandle into the WindowHandleBuilder impl, seperating it from the loop entirely. Then the loop just has to propagate events and run forever. Not entirely sure about future design implications of it though.

@vmarcella vmarcella marked this pull request as ready for review October 9, 2022 03:56
@vmarcella vmarcella merged commit da3d646 into main Oct 9, 2022
@vmarcella vmarcella deleted the ahlawat/winit-refactor branch January 31, 2023 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants