[PATCH weston] compositor: update the transform when attaching a new buffer
Giulio Camuffo
giuliocamuffo at gmail.com
Tue Dec 10 06:55:29 PST 2013
if a surface has not a buffer yet and a weston_view gets created for
it, the surface's width and height will be 0 and the view's output_mask
will be 0, because the surface's area is 0. Later commits on the surface
with valid buffers will then trigger a surface repaint, which will do
nothing because of the output_mask set to 0. So by calling
weston_update_transform() on the views of the surface at the end of
weston_surface_commit() we update the output_mask of the surface and
of the views, so they will be repainted.
---
src/compositor.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/compositor.c b/src/compositor.c
index 6beea9c..20d9efb 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2005,7 +2005,6 @@ weston_surface_commit(struct weston_surface *surface)
surface->pending.buffer = NULL;
surface->pending.sx = 0;
surface->pending.sy = 0;
- surface->pending.newly_attached = 0;
/* wl_surface.damage */
pixman_region32_union(&surface->damage, &surface->damage,
@@ -2046,7 +2045,13 @@ weston_surface_commit(struct weston_surface *surface)
weston_surface_commit_subsurface_order(surface);
+ if (surface->pending.newly_attached) {
+ wl_list_for_each(view, &surface->views, surface_link)
+ weston_view_update_transform(view);
+ }
weston_surface_schedule_repaint(surface);
+
+ surface->pending.newly_attached = 0;
}
static void
--
1.8.5.1
More information about the wayland-devel
mailing list