mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
backend/drm: drop export_drm_bo
Not used anymore.
This commit is contained in:
parent
dabd2e7207
commit
d09abe86c1
2 changed files with 0 additions and 29 deletions
|
@ -141,34 +141,6 @@ void drm_surface_unset_current(struct wlr_drm_surface *surf) {
|
||||||
surf->back_buffer = NULL;
|
surf->back_buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool export_drm_bo(struct gbm_bo *bo, struct wlr_dmabuf_attributes *attribs) {
|
|
||||||
memset(attribs, 0, sizeof(struct wlr_dmabuf_attributes));
|
|
||||||
|
|
||||||
attribs->n_planes = gbm_bo_get_plane_count(bo);
|
|
||||||
if (attribs->n_planes > WLR_DMABUF_MAX_PLANES) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
attribs->width = gbm_bo_get_width(bo);
|
|
||||||
attribs->height = gbm_bo_get_height(bo);
|
|
||||||
attribs->format = gbm_bo_get_format(bo);
|
|
||||||
attribs->modifier = gbm_bo_get_modifier(bo);
|
|
||||||
|
|
||||||
for (int i = 0; i < attribs->n_planes; ++i) {
|
|
||||||
attribs->offset[i] = gbm_bo_get_offset(bo, i);
|
|
||||||
attribs->stride[i] = gbm_bo_get_stride_for_plane(bo, i);
|
|
||||||
attribs->fd[i] = gbm_bo_get_fd(bo);
|
|
||||||
if (attribs->fd[i] < 0) {
|
|
||||||
for (int j = 0; j < i; ++j) {
|
|
||||||
close(attribs->fd[j]);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void drm_plane_finish_surface(struct wlr_drm_plane *plane) {
|
void drm_plane_finish_surface(struct wlr_drm_plane *plane) {
|
||||||
if (!plane) {
|
if (!plane) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,6 @@ void finish_drm_renderer(struct wlr_drm_renderer *renderer);
|
||||||
|
|
||||||
bool drm_surface_make_current(struct wlr_drm_surface *surf, int *buffer_age);
|
bool drm_surface_make_current(struct wlr_drm_surface *surf, int *buffer_age);
|
||||||
void drm_surface_unset_current(struct wlr_drm_surface *surf);
|
void drm_surface_unset_current(struct wlr_drm_surface *surf);
|
||||||
bool export_drm_bo(struct gbm_bo *bo, struct wlr_dmabuf_attributes *attribs);
|
|
||||||
|
|
||||||
void drm_fb_clear(struct wlr_drm_fb *fb);
|
void drm_fb_clear(struct wlr_drm_fb *fb);
|
||||||
bool drm_fb_lock_surface(struct wlr_drm_fb *fb, struct wlr_drm_surface *surf);
|
bool drm_fb_lock_surface(struct wlr_drm_fb *fb, struct wlr_drm_surface *surf);
|
||||||
|
|
Loading…
Reference in a new issue