mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-20 04:28:06 +00:00
gtk/render_surface: report dmabuf build errors
This commit is contained in:
@@ -241,11 +241,16 @@ pub const RenderSurface = extern struct {
|
||||
planes.* = frame.planes;
|
||||
errdefer planes.deinit();
|
||||
|
||||
var err_: ?*glib.Error = null;
|
||||
const texture = builder.build(
|
||||
dmabufDestroy,
|
||||
planes,
|
||||
null,
|
||||
) orelse return error.DmabufBuildFailed;
|
||||
&err_,
|
||||
) orelse {
|
||||
if (err_) |err|
|
||||
log.warn("failed to build dmabuf err={s}", .{err.f_message orelse "(unknown)"});
|
||||
return error.DmabufBuildFailed;
|
||||
};
|
||||
|
||||
// Swap out the old texture.
|
||||
if (priv.texture) |old| old.as(gobject.Object).unref();
|
||||
|
||||
Reference in New Issue
Block a user