ivi-shell: don't schedule compositor repaint

it is not necessary to repaint all outputs after
each commit_changes. Only outputs with modified
views has to be repainted.

We need to call weston_view_update_transform
for assigning views to outputs first.
Then, We can call weston_view_schedule_repaint
to trigger repaint for outputs.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Emre Ucan 7 years ago committed by Pekka Paalanen
parent a4608461b2
commit 7b690559a5
  1. 13
      ivi-shell/ivi-layout.c

@ -27,7 +27,7 @@
* Implementation of ivi-layout library. The actual view on ivi_screen is
* not updated until ivi_layout_commit_changes is called. An overview from
* calling API for updating properties of ivi_surface/ivi_layer to asking
* compositor to compose them by using weston_compositor_schedule_repaint,
* compositor to compose them by using weston_view_schedule_repaint,
* 0/ initialize this library by ivi_layout_init_with_compositor
* with (struct weston_compositor *ec) from ivi-shell.
* 1/ When an API for updating properties of ivi_surface/ivi_layer, it updates
@ -51,8 +51,8 @@
* 4/ According properties, set transformation by using weston_matrix and
* weston_view per ivi_surfaces and ivi_layers in while loop.
* 5/ Set damage and trigger transform by using weston_view_geometry_dirty.
* 6/ Notify update of properties.
* 7/ Trigger composition by weston_compositor_schedule_repaint.
* 6/ Schedule repaint for each view by using weston_view_schedule_repaint.
* 7/ Notify update of properties.
*
*/
#include "config.h"
@ -577,13 +577,13 @@ update_prop(struct ivi_layout_view *ivi_view)
&ivi_view->transform.link);
weston_view_set_transform_parent(ivi_view->view, NULL);
weston_view_geometry_dirty(ivi_view->view);
weston_view_update_transform(ivi_view->view);
}
ivisurf->update_count++;
weston_view_geometry_dirty(ivi_view->view);
weston_surface_damage(ivisurf->surface);
weston_view_schedule_repaint(ivi_view->view);
}
static void
@ -1752,7 +1752,6 @@ ivi_layout_commit_changes(void)
commit_changes(layout);
send_prop(layout);
weston_compositor_schedule_repaint(layout->compositor);
return IVI_SUCCEEDED;
}

Loading…
Cancel
Save