Commit f2d19cf7 authored by xichen's avatar xichen

drm-backend: removing the restriction of exclusively presenting in

plane-assignment

in `drm_output_propose_state`, we are removing the restriction of exclusively
present for view to be assigned on a plane, as in the case of cloning outputs,
no views would fit this condition. Now one view can be assigned to different
planes on different outputs.
Signed-off-by: xichen's avatarxichen zhou <sichem.zh@gmail.com>
parent cdc8230c
Pipeline #146943 passed with stages
in 1 minute and 32 seconds
......@@ -843,7 +843,13 @@ drm_output_propose_state(struct weston_output *output_base,
pixman_region32_init(&planes_region);
pixman_region32_init(&occluded_region);
wl_list_for_each(ev, &output_base->compositor->view_list, link) {
/* using output->view_list we could avoid testing if the view touches
* the output. Also, since we enable independent overlapping damage
* tracking, for cloning outputs, we would need to allow view assign on
* different planes in different outputs.
*/
wl_list_for_each(ev, &output_base->view_list,
output_damages[output_base->id].link) {
struct drm_plane_state *ps = NULL;
bool force_renderer = false;
pixman_region32_t clipped_view;
......@@ -854,22 +860,6 @@ drm_output_propose_state(struct weston_output *output_base,
ev, output->base.name,
(unsigned long) output->base.id);
/* 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))) {
drm_debug(b, "\t\t\t\t[view] ignoring view %p "
"(not on our output)\n", ev);
continue;
}
/* We only assign planes to views which are exclusively present
* on our output. */
if (ev->output_mask != (1u << output->base.id)) {
drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
"(on multiple outputs)\n", ev);
force_renderer = true;
}
if (!weston_view_has_valid_buffer(ev)) {
drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane "
"(no buffer available)\n", ev);
......@@ -1072,15 +1062,12 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data)
assert(state);
drm_debug(b, "\t[repaint] Using %s composition\n",
drm_propose_state_mode_to_string(mode));
wl_list_for_each(ev, &output_base->compositor->view_list, link) {
/* using output->view_list we could avoid testing if the view touches
* the output */
wl_list_for_each(ev, &output_base->view_list,
output_damages[output_base->id].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.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment