[PATCH weston 09/11] Clip surface damage to the surface area
Kristian Høgsberg
hoegsberg at gmail.com
Thu Nov 8 08:29:43 PST 2012
On Wed, Nov 07, 2012 at 05:51:43PM +1100, Daniel Stone wrote:
> Otherwise glTexSubImage2D will reject our co-ordinates as being out of
> bounds.
>
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> ---
> src/compositor.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index 6b0c004..d5b13c8 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1260,8 +1260,13 @@ surface_commit(struct wl_client *client, struct wl_resource *resource)
> surface->pending.sy);
>
> /* wl_surface.damage */
> + pixman_region32_init_rect(&opaque, 0, 0,
> + surface->geometry.width,
> + surface->geometry.height);
> pixman_region32_union(&surface->damage, &surface->damage,
> &surface->pending.damage);
> + pixman_region32_intersect(&surface->damage, &surface->damage,
> + &opaque);
> empty_region(&surface->pending.damage);
Use pixman_region32_intersect_rect() instead of re/ab-using opaque?
Kristian
> /* wl_surface.set_opaque_region */
> --
> 1.7.10.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list