mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-08 05:40:34 +01:00
Merge branch 'compclip' into 'master'
fb: Fix fbComposite source and mask clipping See merge request xorg/xserver!139
This commit is contained in:
commit
c3d5a22c91
1 changed files with 14 additions and 7 deletions
21
fb/fbpict.c
21
fb/fbpict.c
|
|
@ -284,6 +284,7 @@ create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
|
|||
FbStride stride;
|
||||
int bpp;
|
||||
pixman_image_t *image;
|
||||
RegionPtr clip;
|
||||
|
||||
fbGetDrawablePixmap(pict->pDrawable, pixmap, *xoff, *yoff);
|
||||
fbGetPixmapBitsData(pixmap, bits, stride, bpp);
|
||||
|
|
@ -302,20 +303,26 @@ create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
|
|||
(pixman_write_memory_func_t) wfbWriteMemory);
|
||||
#endif
|
||||
|
||||
/* pCompositeClip is undefined for source pictures, so
|
||||
* only set the clip region for pictures with drawables
|
||||
*/
|
||||
if (has_clip) {
|
||||
clip = pict->pCompositeClip;
|
||||
|
||||
if (!has_clip) {
|
||||
/* pCompositeClip is undefined for source pictures, so
|
||||
* use the client clip region directly
|
||||
*/
|
||||
clip = pict->clientClip;
|
||||
}
|
||||
|
||||
if (clip) {
|
||||
if (pict->clientClip)
|
||||
pixman_image_set_has_client_clip(image, TRUE);
|
||||
|
||||
if (*xoff || *yoff)
|
||||
pixman_region_translate(pict->pCompositeClip, *xoff, *yoff);
|
||||
pixman_region_translate(clip, *xoff, *yoff);
|
||||
|
||||
pixman_image_set_clip_region(image, pict->pCompositeClip);
|
||||
pixman_image_set_clip_region(image, clip);
|
||||
|
||||
if (*xoff || *yoff)
|
||||
pixman_region_translate(pict->pCompositeClip, -*xoff, -*yoff);
|
||||
pixman_region_translate(clip, -*xoff, -*yoff);
|
||||
}
|
||||
|
||||
/* Indexed table */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue