mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 08:52:08 +00:00
Use pixman_region32_clear instead of our own empty_region
This requires pixman 0.25.2 Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
This commit is contained in:
parent
32abdbbad9
commit
ef5400843f
|
@ -550,13 +550,6 @@ surface_set_input_region(struct wl_client *client,
|
||||||
fprintf(stderr, "surface_set_input_region\n");
|
fprintf(stderr, "surface_set_input_region\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
empty_region(pixman_region32_t *region)
|
|
||||||
{
|
|
||||||
pixman_region32_fini(region);
|
|
||||||
pixman_region32_init(region);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
surface_commit(struct wl_client *client, struct wl_resource *resource)
|
surface_commit(struct wl_client *client, struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
|
@ -574,7 +567,7 @@ surface_commit(struct wl_client *client, struct wl_resource *resource)
|
||||||
surface->pending.newly_attached = 0;
|
surface->pending.newly_attached = 0;
|
||||||
|
|
||||||
/* wl_surface.damage */
|
/* wl_surface.damage */
|
||||||
empty_region(&surface->pending.damage);
|
pixman_region32_clear(&surface->pending.damage);
|
||||||
|
|
||||||
/* wl_surface.frame */
|
/* wl_surface.frame */
|
||||||
wl_list_insert_list(&surface->frame_callback_list,
|
wl_list_insert_list(&surface->frame_callback_list,
|
||||||
|
|
|
@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
|
AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
|
||||||
|
|
||||||
COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"
|
COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1 >= 0.25.2"
|
||||||
|
|
||||||
AC_ARG_ENABLE(egl, [ --disable-egl],,
|
AC_ARG_ENABLE(egl, [ --disable-egl],,
|
||||||
enable_egl=yes)
|
enable_egl=yes)
|
||||||
|
|
|
@ -329,13 +329,6 @@ surface_handle_pending_buffer_destroy(struct wl_listener *listener, void *data)
|
||||||
surface->pending.buffer = NULL;
|
surface->pending.buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
empty_region(pixman_region32_t *region)
|
|
||||||
{
|
|
||||||
pixman_region32_fini(region);
|
|
||||||
pixman_region32_init(region);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
region_init_infinite(pixman_region32_t *region)
|
region_init_infinite(pixman_region32_t *region)
|
||||||
{
|
{
|
||||||
|
@ -1561,7 +1554,7 @@ surface_flush_damage(struct weston_surface *surface)
|
||||||
wl_shm_buffer_get(surface->buffer_ref.buffer->resource))
|
wl_shm_buffer_get(surface->buffer_ref.buffer->resource))
|
||||||
surface->compositor->renderer->flush_damage(surface);
|
surface->compositor->renderer->flush_damage(surface);
|
||||||
|
|
||||||
empty_region(&surface->damage);
|
pixman_region32_clear(&surface->damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2020,7 +2013,7 @@ surface_set_opaque_region(struct wl_client *client,
|
||||||
pixman_region32_copy(&surface->pending.opaque,
|
pixman_region32_copy(&surface->pending.opaque,
|
||||||
®ion->region);
|
®ion->region);
|
||||||
} else {
|
} 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,
|
pixman_region32_union(&surface->damage, &surface->damage,
|
||||||
&surface->pending.damage);
|
&surface->pending.damage);
|
||||||
pixman_region32_intersect_rect(&surface->damage, &surface->damage,
|
pixman_region32_intersect_rect(&surface->damage, &surface->damage,
|
||||||
0, 0,
|
0, 0, surface->width, surface->height);
|
||||||
surface->width,
|
pixman_region32_clear(&surface->pending.damage);
|
||||||
surface->height);
|
|
||||||
empty_region(&surface->pending.damage);
|
|
||||||
|
|
||||||
/* wl_surface.set_opaque_region */
|
/* wl_surface.set_opaque_region */
|
||||||
pixman_region32_init_rect(&opaque, 0, 0,
|
pixman_region32_init_rect(&opaque, 0, 0,
|
||||||
|
@ -2334,7 +2325,7 @@ weston_subsurface_commit_from_cache(struct weston_subsurface *sub)
|
||||||
0, 0,
|
0, 0,
|
||||||
surface->width,
|
surface->width,
|
||||||
surface->height);
|
surface->height);
|
||||||
empty_region(&sub->cached.damage);
|
pixman_region32_clear(&sub->cached.damage);
|
||||||
|
|
||||||
/* wl_surface.set_opaque_region */
|
/* wl_surface.set_opaque_region */
|
||||||
pixman_region32_init_rect(&opaque, 0, 0,
|
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);
|
-surface->pending.sx, -surface->pending.sy);
|
||||||
pixman_region32_union(&sub->cached.damage, &sub->cached.damage,
|
pixman_region32_union(&sub->cached.damage, &sub->cached.damage,
|
||||||
&surface->pending.damage);
|
&surface->pending.damage);
|
||||||
empty_region(&surface->pending.damage);
|
pixman_region32_clear(&surface->pending.damage);
|
||||||
|
|
||||||
if (surface->pending.newly_attached) {
|
if (surface->pending.newly_attached) {
|
||||||
sub->cached.newly_attached = 1;
|
sub->cached.newly_attached = 1;
|
||||||
|
|
|
@ -52,13 +52,6 @@ struct weston_touch_drag {
|
||||||
struct weston_touch_grab grab;
|
struct weston_touch_grab grab;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
|
||||||
empty_region(pixman_region32_t *region)
|
|
||||||
{
|
|
||||||
pixman_region32_fini(region);
|
|
||||||
pixman_region32_init(region);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
data_offer_accept(struct wl_client *client, struct wl_resource *resource,
|
data_offer_accept(struct wl_client *client, struct wl_resource *resource,
|
||||||
uint32_t serial, const char *mime_type)
|
uint32_t serial, const char *mime_type)
|
||||||
|
@ -203,7 +196,7 @@ drag_surface_configure(struct weston_drag *drag,
|
||||||
wl_list_remove(&drag->icon->layer_link);
|
wl_list_remove(&drag->icon->layer_link);
|
||||||
wl_list_insert(list, &drag->icon->layer_link);
|
wl_list_insert(list, &drag->icon->layer_link);
|
||||||
weston_view_update_transform(drag->icon);
|
weston_view_update_transform(drag->icon);
|
||||||
empty_region(&es->pending.input);
|
pixman_region32_clear(&es->pending.input);
|
||||||
}
|
}
|
||||||
|
|
||||||
drag->dx += sx;
|
drag->dx += sx;
|
||||||
|
@ -358,7 +351,7 @@ data_device_end_drag_grab(struct weston_drag *drag,
|
||||||
weston_view_unmap(drag->icon);
|
weston_view_unmap(drag->icon);
|
||||||
|
|
||||||
drag->icon->surface->configure = NULL;
|
drag->icon->surface->configure = NULL;
|
||||||
empty_region(&drag->icon->surface->pending.input);
|
pixman_region32_clear(&drag->icon->surface->pending.input);
|
||||||
wl_list_remove(&drag->icon_destroy_listener.link);
|
wl_list_remove(&drag->icon_destroy_listener.link);
|
||||||
weston_view_destroy(drag->icon);
|
weston_view_destroy(drag->icon);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue