summaryrefslogtreecommitdiff
path: root/src/screen/drm/card.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-02-02 09:04:45 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2025-02-02 09:04:45 +0100
commit0b6ee849722002a8bc7cc5374e3136bee4be2ccd (patch)
tree729e99b7e87d8cd298f3b62cd2b97f362b863216 /src/screen/drm/card.zig
parent88aa2940b27044794d4dcb49c924a5df17cc0055 (diff)
screen: add frame-buffer
Diffstat (limited to 'src/screen/drm/card.zig')
-rw-r--r--src/screen/drm/card.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/screen/drm/card.zig b/src/screen/drm/card.zig
index 411716a..d66a5f1 100644
--- a/src/screen/drm/card.zig
+++ b/src/screen/drm/card.zig
@@ -7,6 +7,7 @@ const Resources = @import("resources.zig").Resources;
const Connector = @import("connector/root.zig").Connector;
const Encoder = @import("encoder/root.zig").Encoder;
const Crtc = @import("crtc/root.zig").Crtc;
+const FrameBuffer = @import("frame-buffer/root.zig").FrameBuffer;
pub const Card = struct {
@@ -52,4 +53,8 @@ pub const Card = struct {
pub fn crtc(self: *Card, id: u32) !Crtc {
return Crtc.init(self, id);
}
+
+ pub fn create_frame_buffer(self: *Card, width: u32, height: u32, bpp: u32) !FrameBuffer {
+ return FrameBuffer.init(self, width, height, bpp);
+ }
};