mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
backend/drm: use wlr_texture_from_buffer
This commit is contained in:
parent
a8d7c2d4ea
commit
9ca743f9fd
1 changed files with 2 additions and 6 deletions
|
@ -18,6 +18,7 @@
|
||||||
#include "render/pixel_format.h"
|
#include "render/pixel_format.h"
|
||||||
#include "render/swapchain.h"
|
#include "render/swapchain.h"
|
||||||
#include "render/wlr_renderer.h"
|
#include "render/wlr_renderer.h"
|
||||||
|
#include "render/wlr_texture.h"
|
||||||
|
|
||||||
bool init_drm_renderer(struct wlr_drm_backend *drm,
|
bool init_drm_renderer(struct wlr_drm_backend *drm,
|
||||||
struct wlr_drm_renderer *renderer) {
|
struct wlr_drm_renderer *renderer) {
|
||||||
|
@ -135,12 +136,7 @@ static struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_dmabuf_attributes attribs = {0};
|
struct wlr_texture *tex = wlr_texture_from_buffer(renderer, buffer);
|
||||||
if (!wlr_buffer_get_dmabuf(buffer, &attribs)) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct wlr_texture *tex = wlr_texture_from_dmabuf(renderer, &attribs);
|
|
||||||
if (tex == NULL) {
|
if (tex == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue