summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-30 14:33:33 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-05-17 13:39:16 +0300
commit130ae6e7d601faa3a5f01c9d88b6814e408fc211 (patch)
tree9025574e95568de939a72841250636605d242eca
parent20c7e559432c9a24fb03adbdd6ca8815246f36fe (diff)
downloadweston-130ae6e7d601faa3a5f01c9d88b6814e408fc211.tar.gz
compositor: surface and view output comment fixes
weston_surface::output and weston_view::output as used for different purposes. Only the surface output is used for frame callbacks. The uses of the view output are much more vague and hard to describe. Also fix a comment mistake in weston_surface_assign_output(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com> [Pekka: more verbose on the compositor.h comments]
-rw-r--r--src/compositor.c8
-rw-r--r--src/compositor.h9
2 files changed, 9 insertions, 8 deletions
diff --git a/src/compositor.c b/src/compositor.c
index ee47a827..40d8bafd 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1082,16 +1082,15 @@ weston_surface_update_output_mask(struct weston_surface *es, uint32_t mask)
}
}
-
/** Recalculate which output(s) the surface has views displayed on
*
* \param es The surface to remap to outputs
*
* Finds the output that is showing the largest amount of one
* of the surface's various views. This output becomes the
- * surface's primary output for vsync and frame event purposes.
+ * surface's primary output for vsync and frame callback purposes.
*
- * Also notes the primary outputs of all of the surface's views
+ * Also notes all outputs of all of the surface's views
* in the output_mask for the surface.
*/
static void
@@ -1136,8 +1135,7 @@ weston_surface_assign_output(struct weston_surface *es)
*
* Identifies the set of outputs that the view is visible on,
* noting them into the output_mask. The output that the view
- * is most visible on is set as the view's primary output for
- * vsync and frame event purposes.
+ * is most visible on is set as the view's primary output.
*
* Also does the same for the view's surface. See
* weston_surface_assign_output().
diff --git a/src/compositor.h b/src/compositor.h
index 91d1a22d..0bbf4586 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -949,8 +949,9 @@ struct weston_view {
} transform;
/*
- * Which output to vsync this surface to.
- * Used to determine, whether to send or queue frame events.
+ * The primary output for this view.
+ * Used for picking the output for driving internal animations on the
+ * view, inheriting the primary output for related views in shells, etc.
*/
struct weston_output *output;
@@ -1019,7 +1020,9 @@ struct weston_surface {
/*
* Which output to vsync this surface to.
- * Used to determine, whether to send or queue frame events.
+ * Used to determine whether to send or queue frame events, and for
+ * other client-visible syncing/throttling tied to the output
+ * repaint cycle.
*/
struct weston_output *output;