[Nouveau] [PATCH] avoid build fail without COMPOSITE
Tobias Klausmann
tobias.johannes.klausmann at mni.thm.de
Tue Jul 14 14:27:18 PDT 2015
Lgtm! You can add my R-b if you want!
On 14.07.2015 23:17, Ilia Mirkin wrote:
> ---
> src/nouveau_dri2.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
> index f22e319..4398559 100644
> --- a/src/nouveau_dri2.c
> +++ b/src/nouveau_dri2.c
> @@ -142,6 +142,7 @@ nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegio
> NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen));
> RegionPtr pCopyClip;
> GCPtr pGC;
> + PixmapPtr pPix;
> DrawablePtr src_draw, dst_draw;
> Bool translate = FALSE;
> int off_x = 0, off_y = 0;
> @@ -170,9 +171,13 @@ nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegio
> }
>
> if (translate && pDraw->type == DRAWABLE_WINDOW) {
> - PixmapPtr pPix = get_drawable_pixmap(pDraw);
> - off_x = pDraw->x - pPix->screen_x;
> - off_y = pDraw->y - pPix->screen_y;
> + off_x = pDraw->x;
> + off_y = pDraw->y;
> +#ifdef COMPOSITE
> + pPix = get_drawable_pixmap(pDraw);
> + off_x -= pPix->screen_x;
> + off_y -= pPix->screen_y;
> +#endif
> }
>
> pGC = GetScratchGC(pDraw->depth, pScreen);
> @@ -194,8 +199,8 @@ nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegio
> if (extents->x1 == 0 && extents->y1 == 0 &&
> extents->x2 == pDraw->width &&
> extents->y2 == pDraw->height) {
> - PixmapPtr fpix = get_drawable_pixmap(dst_draw);
> - struct nouveau_bo *bo = nouveau_pixmap_bo(fpix);
> + pPix = get_drawable_pixmap(dst_draw);
> + struct nouveau_bo *bo = nouveau_pixmap_bo(pPix);
> if (bo)
> nouveau_bo_wait(bo, NOUVEAU_BO_RD, pNv->client);
> }
More information about the Nouveau
mailing list