struct linux_dmabuf_buffer *dmabuf;
struct drm_fb *fb;
- /* Don't import buffers which span multiple outputs. */
- if (ev->output_mask != (1u << output->base.id))
- return NULL;
-
if (ev->alpha != 1.0f)
return NULL;
if (plane->state_cur->output && plane->state_cur->output != output)
return NULL;
- /* Don't import buffers which span multiple outputs. */
- if (ev->output_mask != (1u << output->base.id))
- return NULL;
-
/* We use GBM to import SHM buffers. */
if (b->gbm == NULL)
return NULL;
wl_list_for_each(ev, &output_base->compositor->view_list, link) {
struct weston_plane *next_plane = NULL;
+ /* If this view doesn't touch our output at all, there's no
+ * reason to do anything with it. */
+ if (!(ev->output_mask & (1u << output->base.id)))
+ continue;
+
+ /* We only assign planes to views which are exclusively present
+ * on our output. */
+ if (ev->output_mask != (1u << output->base.id))
+ next_plane = primary;
+
/* Since we process views from top to bottom, we know that if
* the view intersects the calculated renderer region, it must
* be part of, or occluded by, it, and cannot go on a plane. */
wl_list_for_each(ev, &output_base->compositor->view_list, link) {
struct drm_plane *target_plane = NULL;
+ /* If this view doesn't touch our output at all, there's no
+ * reason to do anything with it. */
+ if (!(ev->output_mask & (1u << output->base.id)))
+ continue;
+
/* Test whether this buffer can ever go into a plane:
* non-shm, or small enough to be a cursor.
*