shaped-texture: Fix build

This commit is contained in:
Jasper St. Pierre 2013-08-29 17:14:11 -04:00
parent daba05f6a7
commit 705978405b

View File

@ -691,18 +691,18 @@ wayland_surface_update_area (MetaShapedTexture *stex,
} }
static void static void
queue_damage_redraw_with_clip (MetaShapedTexture *stex, get_clip (MetaShapedTexture *stex,
int x, int x,
int y, int y,
int width, int width,
int height) int height,
cairo_rectangle_int_t *clip)
{ {
ClutterActor *self = CLUTTER_ACTOR (stex); ClutterActor *self = CLUTTER_ACTOR (stex);
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
ClutterActorBox allocation; ClutterActorBox allocation;
float scale_x; float scale_x;
float scale_y; float scale_y;
cairo_rectangle_int_t clip;
/* NB: clutter_actor_queue_redraw_with_clip expects a box in the actor's /* NB: clutter_actor_queue_redraw_with_clip expects a box in the actor's
* coordinate space so we need to convert from surface coordinates to * coordinate space so we need to convert from surface coordinates to
@ -731,11 +731,10 @@ queue_damage_redraw_with_clip (MetaShapedTexture *stex,
scale_x = (allocation.x2 - allocation.x1) / priv->tex_width; scale_x = (allocation.x2 - allocation.x1) / priv->tex_width;
scale_y = (allocation.y2 - allocation.y1) / priv->tex_height; scale_y = (allocation.y2 - allocation.y1) / priv->tex_height;
clip.x = x * scale_x; clip->x = x * scale_x;
clip.y = y * scale_y; clip->y = y * scale_y;
clip.width = width * scale_x; clip->width = width * scale_x;
clip.height = height * scale_y; clip->height = height * scale_y;
clutter_actor_queue_redraw_with_clip (self, &clip);
} }
/** /**
@ -765,6 +764,7 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
cairo_region_t *unobscured_region) cairo_region_t *unobscured_region)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
cairo_rectangle_int_t clip;
priv = stex->priv; priv = stex->priv;
@ -784,6 +784,8 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height); meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
get_clip (stex, x, y, width, height, &clip);
if (unobscured_region) if (unobscured_region)
{ {
cairo_region_t *intersection; cairo_region_t *intersection;