compositor: Remove surface overlapped attribute
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 24 Feb 2012 04:06:13 +0000 (23:06 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 24 Feb 2012 04:06:13 +0000 (23:06 -0500)
We need to compute this as we assign surfaces to overlays, so that
if we assign a surface to an overlay, it isn't considered overlapping.

src/compositor.c
src/compositor.h

index f99afc6..b12c583 100644 (file)
@@ -914,8 +914,7 @@ weston_output_repaint(struct weston_output *output, int msecs)
        struct weston_surface *es;
        struct weston_animation *animation, *next;
        struct weston_frame_callback *cb, *cnext;
-       pixman_region32_t opaque, new_damage, total_damage,
-               overlap, surface_overlap;
+       pixman_region32_t opaque, new_damage, total_damage;
        int32_t width, height;
 
        weston_compositor_update_drag_surfaces(ec);
@@ -928,22 +927,12 @@ weston_output_repaint(struct weston_output *output, int msecs)
 
        pixman_region32_init(&new_damage);
        pixman_region32_init(&opaque);
-       pixman_region32_init(&overlap);
 
-       wl_list_for_each(es, &ec->surface_list, link) {
+       wl_list_for_each(es, &ec->surface_list, link)
                /* Update surface transform now to avoid calling it ever
                 * again from the repaint sub-functions. */
                weston_surface_update_transform(es);
 
-               pixman_region32_init(&surface_overlap);
-               pixman_region32_intersect(&surface_overlap, &overlap,
-                                         &es->transform.boundingbox);
-               es->overlapped = pixman_region32_not_empty(&surface_overlap);
-               pixman_region32_fini(&surface_overlap);
-               pixman_region32_union(&overlap, &overlap,
-                                     &es->transform.boundingbox);
-       }
-
        if (output->assign_planes)
                /*
                 * This will queue flips for the fbs and sprites where
@@ -966,7 +955,6 @@ weston_output_repaint(struct weston_output *output, int msecs)
                                  &new_damage, &output->region);
 
        pixman_region32_fini(&opaque);
-       pixman_region32_fini(&overlap);
        pixman_region32_fini(&new_damage);
 
        wl_list_for_each(es, &ec->surface_list, link) {
index 4a36824..881f53c 100644 (file)
@@ -256,7 +256,6 @@ struct weston_surface {
        struct weston_shader *shader;
        GLfloat color[4];
        uint32_t alpha;
-       int overlapped;
 
        /* Surface geometry state, mutable.
         * If you change anything, set dirty = 1.