[PATCH 27/29] dri2: add initial prime support. (v1.2)
Chris Wilson
chris at chris-wilson.co.uk
Thu Sep 6 05:21:46 PDT 2012
On Thu, 06 Sep 2012 13:17:50 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Thu, 5 Jul 2012 21:30:34 +0100, Dave Airlie <airlied at gmail.com> wrote:
> > +static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
> > + DRI2BufferPtr pDest, DRI2BufferPtr pSrc)
> > +{
> > + DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
> > + DRI2ScreenPtr ds;
> > + ScreenPtr primeScreen;
> > +
> > + primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
> > + ds = DRI2GetScreen(primeScreen);
> > +
> > + if (ds->CopyRegion2)
> > + (*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc);
> > + else
> > + (*ds->CopyRegion) (pDraw, pRegion, pDest, pSrc);
> > +
> > + /* cause damage to the box */
> > + if (pPriv->prime_id) {
> > + BoxRec box;
> > + RegionRec region;
> > + box.x1 = 0;
> > + box.x2 = box.x1 + pDraw->width;
> > + box.y1 = 0;
> > + box.y2 = box.y1 + pDraw->height;
> > + RegionInit(®ion, &box, 1);
> > + RegionTranslate(®ion, pDraw->x, pDraw->y);
>
> Double translation here and this bug has been copied into the other
> drivers as well.
Weirder is that gnome-shell depends on this translation, xcompmgr is
buggy with.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the xorg-devel
mailing list