mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
backend/drm: remove format arg from drm_plane_init_surface
This was always set to ARGB8888.
This commit is contained in:
parent
9e9be83a58
commit
e06ea4e84a
3 changed files with 7 additions and 8 deletions
|
@ -676,10 +676,9 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
||||||
|
|
||||||
int width = mode.hdisplay;
|
int width = mode.hdisplay;
|
||||||
int height = mode.vdisplay;
|
int height = mode.vdisplay;
|
||||||
uint32_t format = DRM_FORMAT_ARGB8888;
|
|
||||||
|
|
||||||
bool modifiers = drm->addfb2_modifiers;
|
bool modifiers = drm->addfb2_modifiers;
|
||||||
if (!drm_plane_init_surface(plane, drm, width, height, format, modifiers) ||
|
if (!drm_plane_init_surface(plane, drm, width, height, modifiers) ||
|
||||||
!drm_connector_pageflip_renderer(conn, state)) {
|
!drm_connector_pageflip_renderer(conn, state)) {
|
||||||
if (!modifiers) {
|
if (!modifiers) {
|
||||||
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer:"
|
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer:"
|
||||||
|
@ -694,8 +693,7 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
||||||
"retrying without modifiers");
|
"retrying without modifiers");
|
||||||
modifiers = false;
|
modifiers = false;
|
||||||
|
|
||||||
if (!drm_plane_init_surface(plane, drm, width, height, format,
|
if (!drm_plane_init_surface(plane, drm, width, height, modifiers)) {
|
||||||
modifiers)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!drm_connector_pageflip_renderer(conn, state)) {
|
if (!drm_connector_pageflip_renderer(conn, state)) {
|
||||||
|
@ -860,8 +858,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||||
ret = drmGetCap(drm->fd, DRM_CAP_CURSOR_HEIGHT, &h);
|
ret = drmGetCap(drm->fd, DRM_CAP_CURSOR_HEIGHT, &h);
|
||||||
h = ret ? 64 : h;
|
h = ret ? 64 : h;
|
||||||
|
|
||||||
if (!drm_plane_init_surface(plane, drm, w, h,
|
if (!drm_plane_init_surface(plane, drm, w, h, true)) {
|
||||||
DRM_FORMAT_ARGB8888, true)) {
|
|
||||||
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
|
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,9 @@ static struct wlr_drm_format *create_linear_format(uint32_t format) {
|
||||||
|
|
||||||
bool drm_plane_init_surface(struct wlr_drm_plane *plane,
|
bool drm_plane_init_surface(struct wlr_drm_plane *plane,
|
||||||
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
|
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
|
||||||
uint32_t format, bool with_modifiers) {
|
bool with_modifiers) {
|
||||||
|
uint32_t format = DRM_FORMAT_ARGB8888;
|
||||||
|
|
||||||
if (!wlr_drm_format_set_has(&plane->formats, format, DRM_FORMAT_MOD_INVALID)) {
|
if (!wlr_drm_format_set_has(&plane->formats, format, DRM_FORMAT_MOD_INVALID)) {
|
||||||
const struct wlr_pixel_format_info *info =
|
const struct wlr_pixel_format_info *info =
|
||||||
drm_get_pixel_format_info(format);
|
drm_get_pixel_format_info(format);
|
||||||
|
|
|
@ -57,7 +57,7 @@ bool drm_surface_render_black_frame(struct wlr_drm_surface *surf);
|
||||||
|
|
||||||
bool drm_plane_init_surface(struct wlr_drm_plane *plane,
|
bool drm_plane_init_surface(struct wlr_drm_plane *plane,
|
||||||
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
|
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
|
||||||
uint32_t format, bool with_modifiers);
|
bool with_modifiers);
|
||||||
void drm_plane_finish_surface(struct wlr_drm_plane *plane);
|
void drm_plane_finish_surface(struct wlr_drm_plane *plane);
|
||||||
bool drm_plane_lock_surface(struct wlr_drm_plane *plane,
|
bool drm_plane_lock_surface(struct wlr_drm_plane *plane,
|
||||||
struct wlr_drm_backend *drm);
|
struct wlr_drm_backend *drm);
|
||||||
|
|
Loading…
Reference in a new issue