drm: Disable sprites if they're broken
Current sprite implementation has a color format bug. Disable sprites if they don't work and avoid spamming stderr and syslog.
This commit is contained in:
@@ -60,6 +60,7 @@ struct drm_compositor {
|
|||||||
struct tty *tty;
|
struct tty *tty;
|
||||||
|
|
||||||
struct wl_list sprite_list;
|
struct wl_list sprite_list;
|
||||||
|
int sprites_are_broken;
|
||||||
|
|
||||||
uint32_t prev_state;
|
uint32_t prev_state;
|
||||||
};
|
};
|
||||||
@@ -434,6 +435,9 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
|
|||||||
pixman_box32_t *box;
|
pixman_box32_t *box;
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
|
|
||||||
|
if (c->sprites_are_broken)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (surface_is_primary(ec, es))
|
if (surface_is_primary(ec, es))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -484,6 +488,7 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
|
|||||||
&fb_id, 0);
|
&fb_id, 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
fprintf(stderr, "addfb2 failed: %d\n", ret);
|
fprintf(stderr, "addfb2 failed: %d\n", ret);
|
||||||
|
c->sprites_are_broken = 1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user