diff options
Diffstat (limited to 'src/sna/sna_render_inline.h')
-rw-r--r-- | src/sna/sna_render_inline.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sna/sna_render_inline.h b/src/sna/sna_render_inline.h index 64f8a46f..216937a2 100644 --- a/src/sna/sna_render_inline.h +++ b/src/sna/sna_render_inline.h @@ -140,6 +140,25 @@ sna_render_get_alpha_gradient(struct sna *sna) } static inline void +sna_render_picture_extents(PicturePtr p, BoxRec *box) +{ + box->x1 = p->pDrawable->x; + box->y1 = p->pDrawable->y; + box->x2 = p->pDrawable->x + p->pDrawable->width; + box->y2 = p->pDrawable->y + p->pDrawable->height; + + if (box->x1 < p->pCompositeClip->extents.x1) + box->x1 = p->pCompositeClip->extents.x1; + if (box->y1 < p->pCompositeClip->extents.y1) + box->y1 = p->pCompositeClip->extents.y1; + + if (box->x2 > p->pCompositeClip->extents.x2) + box->x2 = p->pCompositeClip->extents.x2; + if (box->y2 > p->pCompositeClip->extents.y2) + box->y2 = p->pCompositeClip->extents.y2; +} + +static inline void sna_render_reduce_damage(struct sna_composite_op *op, int dst_x, int dst_y, int width, int height) |