diff options
Diffstat (limited to 'src/screen/drm/buffer/raw.zig')
| -rw-r--r-- | src/screen/drm/buffer/raw.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/screen/drm/buffer/raw.zig b/src/screen/drm/buffer/raw.zig index a79c6a7..c5a04f3 100644 --- a/src/screen/drm/buffer/raw.zig +++ b/src/screen/drm/buffer/raw.zig @@ -6,16 +6,16 @@ const cerror = @import("../../cerror.zig"); pub const Raw = struct { const Self = @This(); - card: *drm.Card, + card: drm.Card, + id: u32, width: u32, height: u32, stride: u32, handle: u32, - pixels: []volatile drm.Pixel, bytes: []volatile u8, - pub fn init(card: *drm.Card, width: u32, height: u32) !Self { + pub fn init(card: drm.Card, width: u32, height: u32) !Self { var create_dumb = std.mem.zeroInit(drm.request.CreateDumb, .{ .width = width, .height = height, @@ -32,7 +32,6 @@ pub const Raw = struct { .height = create_dumb.height, .stride = create_dumb.pitch, .handle = create_dumb.handle, - .pixels = undefined, .bytes = undefined, .card = card, }; @@ -74,7 +73,6 @@ pub const Raw = struct { try cerror.from_usize(address); - fb.pixels = @as([*]volatile drm.Pixel, @ptrFromInt(address))[0..create_dumb.size / 4]; fb.bytes = @as([*]volatile u8, @ptrFromInt(address))[0..create_dumb.size]; return fb; |