diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-06-26 10:37:36 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-07-05 01:03:55 -0700 |
commit | ef5400843ff53c76ccfac99a80ef84baaee3dc38 (patch) | |
tree | fe83e860caa0cc02851ce2873911aa90c4554570 /src/compositor.c | |
parent | 32abdbbad97e99cc76409ecfa4b446db63907cc3 (diff) | |
download | weston-ef5400843ff53c76ccfac99a80ef84baaee3dc38.tar.gz |
Use pixman_region32_clear instead of our own empty_region
This requires pixman 0.25.2
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Diffstat (limited to 'src/compositor.c')
-rw-r--r-- | src/compositor.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/compositor.c b/src/compositor.c index fa8730f4..d414e274 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -330,13 +330,6 @@ surface_handle_pending_buffer_destroy(struct wl_listener *listener, void *data) } static void -empty_region(pixman_region32_t *region) -{ - pixman_region32_fini(region); - pixman_region32_init(region); -} - -static void region_init_infinite(pixman_region32_t *region) { pixman_region32_init_rect(region, INT32_MIN, INT32_MIN, @@ -1561,7 +1554,7 @@ surface_flush_damage(struct weston_surface *surface) wl_shm_buffer_get(surface->buffer_ref.buffer->resource)) surface->compositor->renderer->flush_damage(surface); - empty_region(&surface->damage); + pixman_region32_clear(&surface->damage); } static void @@ -2020,7 +2013,7 @@ surface_set_opaque_region(struct wl_client *client, pixman_region32_copy(&surface->pending.opaque, ®ion->region); } else { - empty_region(&surface->pending.opaque); + pixman_region32_clear(&surface->pending.opaque); } } @@ -2083,10 +2076,8 @@ weston_surface_commit(struct weston_surface *surface) pixman_region32_union(&surface->damage, &surface->damage, &surface->pending.damage); pixman_region32_intersect_rect(&surface->damage, &surface->damage, - 0, 0, - surface->width, - surface->height); - empty_region(&surface->pending.damage); + 0, 0, surface->width, surface->height); + pixman_region32_clear(&surface->pending.damage); /* wl_surface.set_opaque_region */ pixman_region32_init_rect(&opaque, 0, 0, @@ -2334,7 +2325,7 @@ weston_subsurface_commit_from_cache(struct weston_subsurface *sub) 0, 0, surface->width, surface->height); - empty_region(&sub->cached.damage); + pixman_region32_clear(&sub->cached.damage); /* wl_surface.set_opaque_region */ pixman_region32_init_rect(&opaque, 0, 0, @@ -2386,7 +2377,7 @@ weston_subsurface_commit_to_cache(struct weston_subsurface *sub) -surface->pending.sx, -surface->pending.sy); pixman_region32_union(&sub->cached.damage, &sub->cached.damage, &surface->pending.damage); - empty_region(&surface->pending.damage); + pixman_region32_clear(&surface->pending.damage); if (surface->pending.newly_attached) { sub->cached.newly_attached = 1; |