-
Notifications
You must be signed in to change notification settings - Fork 61
Implement Debug for Context
, Surface
and Buffer
#268
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
base: master
Are you sure you want to change the base?
Conversation
e2d94d0
to
b97e10e
Compare
b97e10e
to
831973c
Compare
@@ -163,6 +166,7 @@ enum Buffer { | |||
Wire(Vec<u32>), |
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.
Would this print the entire pixel buffer?
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 guess so. Might make sense to make a small wrapper struct BufferMinimalDebug(Vec<u32>)
to avoid that.
#[derive(Debug)] | ||
pub struct BufferImpl<'a, D: ?Sized, W> { | ||
native_window_buffer: NativeWindowBufferLockGuard<'a>, | ||
buffer: Vec<u32>, |
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.
Not sure if we want to spam the user with all pixel values 😅
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.
Would prefer if it just printed some platform-generic info like width, height, current state, etc instead of platform-specific info. Would probably be more parsable and helpful for users.
I do think having that, in addition to perhaps having some platform-specific handle (maybe even just Wayland vs X11) and format should be useful. |
Builds upon #267.