compositor: introduce weston_surface_geometry_dirty()

Instead of directly setting the dirty flag on weston_surface geometry,
use a function for that.

This allows us to hook into geometry dirtying in a following patch.

Also add comments to weston_surface fields, whose modification causes
transform state to become outdated.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen
2013-03-08 14:56:49 +02:00
committed by Kristian Høgsberg
parent f1f48cfa35
commit c3ce738653
6 changed files with 38 additions and 36 deletions
+2 -5
View File
@@ -83,11 +83,8 @@ test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy, i
wl_list_insert(&test->layer.surface_list,
&surface->layer_link);
surface->geometry.x = test_surface->x;
surface->geometry.y = test_surface->y;
surface->geometry.width = width;
surface->geometry.height = height;
surface->geometry.dirty = 1;
weston_surface_configure(surface, test_surface->x, test_surface->y,
width, height);
if (!weston_surface_is_mapped(surface))
weston_surface_update_transform(surface);