Skip to content

Commit 55b5bfc

Browse files
drm:BufferObject: remove unused fields
In `BufferObject` remove the `width` and `height` unused fields. We may need them later, in that case we can add them as the requirement. Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 6defcde commit 55b5bfc

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[workspace]
22
members = ["aero_kernel", "aero_syscall", "aero_proc"]
3+
4+
[profile.release]
5+
debug = true

src/aero_kernel/src/drivers/drm/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,14 @@ trait DrmDevice: Send + Sync {
8888

8989
#[derive(Debug, Clone)]
9090
struct BufferObject {
91-
width: u32,
92-
height: u32,
9391
size: usize,
9492
mapping: usize,
9593
memory: Vec<PhysFrame>,
9694
}
9795

9896
impl BufferObject {
99-
pub fn new(width: u32, height: u32, size: usize, memory: Vec<PhysFrame>) -> Self {
97+
pub fn new(size: usize, memory: Vec<PhysFrame>) -> Self {
10098
Self {
101-
width,
102-
height,
10399
size,
104100
mapping: usize::MAX,
105101
memory,

src/aero_kernel/src/drivers/drm/rawfb.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ impl DrmDevice for RawFramebuffer {
4343
memory.push(frame);
4444
}
4545

46-
(
47-
BufferObject::new(width, height, size as usize, memory),
48-
width * bpp / 8,
49-
)
46+
(BufferObject::new(size as usize, memory), width * bpp / 8)
5047
}
5148

5249
fn commit(&self, buffer_obj: &BufferObject) {

0 commit comments

Comments
 (0)