compositor-drm: Check es->image, not es->buffer when looking for overlays
authorKristian Høgsberg <krh@bitplanet.net>
Mon, 26 Mar 2012 15:48:55 +0000 (11:48 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 26 Mar 2012 15:48:55 +0000 (11:48 -0400)
es->buffer can be NULL if the client destroyed the buffer, but es->image
will be non-NULL if and only if we have a buffer we might use with KMS.

src/compositor-drm.c

index 9046f30..4305cd5 100644 (file)
@@ -442,7 +442,7 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
        if (surface_is_primary(ec, es))
                return -1;
 
-       if (!es->buffer)
+       if (es->image == EGL_NO_IMAGE_KHR)
                return -1;
 
        if (!drm_surface_transform_supported(es))