<div dir="ltr">Looks good.<br><br>Reviewed-by: Jasper St. Pierre <<a href="mailto:jstpierre@mecheye.net">jstpierre@mecheye.net</a>><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:16 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This requires pixman 0.25.2<br>
---<br>
clients/nested.c | 9 +--------<br>
<a href="http://configure.ac" target="_blank">configure.ac</a> | 2 +-<br>
src/compositor.c | 15 ++++-----------<br>
src/data-device.c | 11 ++---------<br>
4 files changed, 8 insertions(+), 29 deletions(-)<br>
<br>
diff --git a/clients/nested.c b/clients/nested.c<br>
index 44389e4..2a952be 100644<br>
--- a/clients/nested.c<br>
+++ b/clients/nested.c<br>
@@ -551,13 +551,6 @@ surface_set_input_region(struct wl_client *client,<br>
}<br>
<br>
static void<br>
-empty_region(pixman_region32_t *region)<br>
-{<br>
- pixman_region32_fini(region);<br>
- pixman_region32_init(region);<br>
-}<br>
-<br>
-static void<br>
surface_commit(struct wl_client *client, struct wl_resource *resource)<br>
{<br>
struct nested_surface *surface = wl_resource_get_user_data(resource);<br>
@@ -574,7 +567,7 @@ surface_commit(struct wl_client *client, struct wl_resource *resource)<br>
surface->pending.newly_attached = 0;<br>
<br>
/* wl_surface.damage */<br>
- empty_region(&surface->pending.damage);<br>
+ pixman_region32_clear(&surface->pending.damage);<br>
<br>
/* wl_surface.frame */<br>
wl_list_insert_list(&surface->frame_callback_list,<br>
diff --git a/<a href="http://configure.ac" target="_blank">configure.ac</a> b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
index 648bee8..1938078 100644<br>
--- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
@@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h])<br>
<br>
AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])<br>
<br>
-COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"<br>
+COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1 >= 0.25.2"<br>
<br>
AC_ARG_ENABLE(egl, [ --disable-egl],,<br>
enable_egl=yes)<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index be33a36..391e635 100644<br>
--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -320,13 +320,6 @@ weston_client_launch(struct weston_compositor *compositor,<br>
}<br>
<br>
static void<br>
-empty_region(pixman_region32_t *region)<br>
-{<br>
- pixman_region32_fini(region);<br>
- pixman_region32_init(region);<br>
-}<br>
-<br>
-static void<br>
region_init_infinite(pixman_region32_t *region)<br>
{<br>
pixman_region32_init_rect(region, INT32_MIN, INT32_MIN,<br>
@@ -1599,7 +1592,7 @@ surface_flush_damage(struct weston_surface *surface)<br>
wl_shm_buffer_get(surface->buffer_ref.buffer->resource))<br>
surface->compositor->renderer->flush_damage(surface);<br>
<br>
- empty_region(&surface->damage);<br>
+ pixman_region32_clear(&surface->damage);<br>
}<br>
<br>
static void<br>
@@ -2052,7 +2045,7 @@ surface_set_opaque_region(struct wl_client *client,<br>
pixman_region32_copy(&surface->pending.opaque,<br>
®ion->region);<br>
} else {<br>
- empty_region(&surface->pending.opaque);<br>
+ pixman_region32_clear(&surface->pending.opaque);<br>
}<br>
}<br>
<br>
@@ -2119,7 +2112,7 @@ weston_surface_commit_state(struct weston_surface *surface,<br>
&state->damage);<br>
pixman_region32_intersect_rect(&surface->damage, &surface->damage,<br>
0, 0, surface->width, surface->height);<br>
- empty_region(&state->damage);<br>
+ pixman_region32_clear(&state->damage);<br>
<br>
/* wl_surface.set_opaque_region */<br>
pixman_region32_init(&opaque);<br>
@@ -2361,7 +2354,7 @@ weston_subsurface_commit_to_cache(struct weston_subsurface *sub)<br>
-surface->pending.sx, -surface-><a href="http://pending.sy" target="_blank">pending.sy</a>);<br>
pixman_region32_union(&sub->cached.damage, &sub->cached.damage,<br>
&surface->pending.damage);<br>
- empty_region(&surface->pending.damage);<br>
+ pixman_region32_clear(&surface->pending.damage);<br>
<br>
if (surface->pending.newly_attached) {<br>
sub->cached.newly_attached = 1;<br>
diff --git a/src/data-device.c b/src/data-device.c<br>
index 88c6de3..a069b3c 100644<br>
--- a/src/data-device.c<br>
+++ b/src/data-device.c<br>
@@ -53,13 +53,6 @@ struct weston_touch_drag {<br>
};<br>
<br>
static void<br>
-empty_region(pixman_region32_t *region)<br>
-{<br>
- pixman_region32_fini(region);<br>
- pixman_region32_init(region);<br>
-}<br>
-<br>
-static void<br>
data_offer_accept(struct wl_client *client, struct wl_resource *resource,<br>
uint32_t serial, const char *mime_type)<br>
{<br>
@@ -203,7 +196,7 @@ drag_surface_configure(struct weston_drag *drag,<br>
wl_list_remove(&drag->icon->layer_link);<br>
wl_list_insert(list, &drag->icon->layer_link);<br>
weston_view_update_transform(drag->icon);<br>
- empty_region(&es->pending.input);<br>
+ pixman_region32_clear(&es->pending.input);<br>
}<br>
<br>
drag->dx += sx;<br>
@@ -358,7 +351,7 @@ data_device_end_drag_grab(struct weston_drag *drag,<br>
weston_view_unmap(drag->icon);<br>
<br>
drag->icon->surface->configure = NULL;<br>
- empty_region(&drag->icon->surface->pending.input);<br>
+ pixman_region32_clear(&drag->icon->surface->pending.input);<br>
wl_list_remove(&drag->icon_destroy_listener.link);<br>
weston_view_destroy(drag->icon);<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.0.0<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div>