summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-03-05 19:57:35 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-03-05 19:57:35 -0500
commit65bec2452e5bd1b823ee810e2e48f3607b682e7d (patch)
tree7e6296f990f5bf013cbc3e3cbb77bfbf66ce97d7
parent7dbf5e2ea744bde56b65ba45b935b77df4a783e1 (diff)
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.
-rw-r--r--src/compositor-drm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index d2a5652b..9796014a 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -60,6 +60,7 @@ struct drm_compositor {
struct tty *tty;
struct wl_list sprite_list;
+ int sprites_are_broken;
uint32_t prev_state;
};
@@ -434,6 +435,9 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
pixman_box32_t *box;
uint32_t format;
+ if (c->sprites_are_broken)
+ return -1;
+
if (surface_is_primary(ec, es))
return -1;
@@ -484,6 +488,7 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
&fb_id, 0);
if (ret) {
fprintf(stderr, "addfb2 failed: %d\n", ret);
+ c->sprites_are_broken = 1;
return -1;
}