Rework project directory structure#369
Merged
Merged
Conversation
This is a major simplification of the project directory structure. An example of what was confusing before was that there were multiple directories named `generic` and `egl`. Now modules are named more specifically and the directory structure is flattened. The new structure: `src/` - `angle/` <- Windows ANGLE backend - `cgl/` <- macOS CGL backend - `hardware_buffer/` <- Android / OHOS hardware buffer backends - `mesa_surfaceless/` <- Mesa-specific pbuffer surface backend - `multi/` <- multi backend - `wayland/` <- Wayland backend - `wgl/` <- Windows WGL backend - `x11/` <- X11 backend - `base` <- a directory for code that can be shared by multiple backends - `io_surface` <- IOSurface shared code (could be used by future Metal backend) - `egl` <- shared EGL types In addition, this commit removes the full file path included as a comment at the top of every source file. These paths are now incorrect and they were likely only there because the directory structure was so confusing. Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
703fc03 to
b527c80
Compare
jdm
approved these changes
Jun 8, 2026
Member
|
Good idea! |
mukilan
reviewed
Jun 8, 2026
| @@ -1,5 +1,3 @@ | |||
| // surfman/surfman/src/platform/egl/mod.rs | |||
| // | |||
| //! Bindings to EGL on Android. | |||
Member
There was a problem hiding this comment.
I guess this comment needs to be updated. I guess this was misleading even before this change though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a major simplification of the project directory structure. An
example of what was confusing before was that there were multiple
directories named
genericandegl. Now modules are named morespecifically and the directory structure is flattened. The new
structure:
src/angle/← Windows ANGLE backendcgl/← macOS CGL backendhardware_buffer/← Android / OHOS hardware buffer backendsmesa_surfaceless/← Mesa-specific pbuffer surface backendmulti/← multi backendwayland/← Wayland backendwgl/← Windows WGL backendx11/← X11 backendbase← a directory for code that can be shared by multiple backendsio_surface← IOSurface shared code (could be used by future Metal backend)egl← shared EGL typesIn addition, this commit removes the full file path included as a
comment at the top of every source file. These paths are now incorrect
and they were likely only there because the directory structure was so
confusing.
This is part of #327.