mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-18 06:59:44 -05:00
wlr_drm_format_set: Store formats on array
This commit is contained in:
parent
90d08f8f1c
commit
300bd80772
6 changed files with 37 additions and 53 deletions
|
|
@ -271,7 +271,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
|
|||
// Forbid implicit modifiers, because their meaning changes from one
|
||||
// GPU to another.
|
||||
for (size_t i = 0; i < texture_formats->len; i++) {
|
||||
const struct wlr_drm_format *fmt = texture_formats->formats[i];
|
||||
const struct wlr_drm_format *fmt = &texture_formats->formats[i];
|
||||
for (size_t j = 0; j < fmt->len; j++) {
|
||||
uint64_t mod = fmt->modifiers[j];
|
||||
if (mod == DRM_FORMAT_MOD_INVALID) {
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ static void update_layer_feedback(struct wlr_drm_backend *drm,
|
|||
}
|
||||
|
||||
for (size_t j = 0; j < plane->formats.len; j++) {
|
||||
const struct wlr_drm_format *format = plane->formats.formats[j];
|
||||
const struct wlr_drm_format *format = &plane->formats.formats[j];
|
||||
for (size_t k = 0; k < format->len; k++) {
|
||||
wlr_drm_format_set_add(&formats, format->format,
|
||||
format->modifiers[k]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue