-
Notifications
You must be signed in to change notification settings - Fork 175
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
Feature/drm planes #760
Feature/drm planes #760
Conversation
25e70a2
to
5caa01a
Compare
b23c15c
to
fe0a6a7
Compare
df4e3d9
to
7aeda28
Compare
a487b58
to
353a96a
Compare
fe0a6a7
to
f8ccbcc
Compare
f8ccbcc
to
d93d3f6
Compare
d93d3f6
to
b86be50
Compare
19c79e7
to
31ac6d2
Compare
src/backend/drm/renderer/mod.rs
Outdated
mut allocator: A, | ||
framebuffer_exporter: F, | ||
renderer_formats: HashSet<DrmFormat>, | ||
cursor_size: Size<u32, BufferCoords>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think cursor_size
should be an Option
because input/cursor isn't required for all compositors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The drm renderer currently tries to assign whatever fits on the cursor plane, so technically it is not required to be a cursor element. With the latest changes the cursor plane can be completely disabled by not passing it to the constructor.
cfa27cb
to
a01ace6
Compare
dafdfee
to
5b969e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few remarks on documentation, but otherwise I am really happy how this has turned out.
/// | ||
/// *Note*: This will only return y-inverted for buffer types known to smithay (see [`buffer_type`]) | ||
#[cfg(feature = "wayland_frontend")] | ||
pub fn buffer_y_inverted(buffer: &wl_buffer::WlBuffer) -> Option<bool> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it is worth, the Result
is more self-explanatory. (and thus probably the better fit here)
Otherwise the function needs some docs, what None
means.
5b969e9
to
f9f07ef
Compare
f9f07ef
to
ef45693
Compare
src/backend/drm/compositor/mod.rs
Outdated
//! None, | ||
//! ); | ||
//! | ||
//! # let device: DrmDevice = unsafe { MaybeUninit::uninit().assume_init() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably just use todo!()
here, I'm a little scared by using MaybeUninit here. Plus the example is no_run
, so it shouldn't cause any real change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have also used unreachable!()
in those cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I never thought about using just todo!()
and always used some obscure ways, thanks!
ef45693
to
19385b1
Compare
this allows storing the buffer for a plane to prevent early release
this remove the External variant of UnderlyingStorage, exposing the TextureId is of no use
debug flags can be enabled at run-time for a renderer for now the only supported flag is TINT which will TINT all rendered textures
this increases api ergonomics for the damage tracker by using IntoIterator instead of a slice
this adds a plane config and state in order to make a complete plane test
this changes Rectangle::overlaps to no longer return true for touching rectangles. the old behavior can be found in Rectangle::overlaps_or_touches
19385b1
to
7c6a949
Compare
the compositor makes use of overlay and cursor planes to enable direct scan-out
7c6a949
to
e0d2584
Compare
Current limitations
no support for screen-captureDrmCompositor::render_frame
now returns a reference to everything needed to implement screencopy. Additional the returned struct implements functions for blitting the frame to a bound buffer.cursor plane known to not work on nvidia (probably related to not using bo flags Cursor)switched to gbm bo write and offscreen rendering -> works nowunderlay/primary plane direct-scan out check could be relaxedthe primary plane can now be used for direct scan-out in more edge casesTODO
GbmBufferedSurface
as a fallback (or compile time feature)? -> The old behavior can be forced by setting theANVIL_DISABLE_DRM_COMPOSITOR
env variable