[PATCH] dri2: Copy front to fake front in swapbuffer

Kristian Høgsberg krh at bitplanet.net
Wed May 12 09:25:39 PDT 2010


Keith, I've assigned bug 27305 to you as it's now blocking on you.
This process doesn't work.  I don't want to have to spend time
following up everyday and then eventually ping you in irc or email to
get you to apply patches on top of actually fixing the bug.

I really think we need to rethink this process.

Kristian

2010/5/10 Kristian Høgsberg <krh at bitplanet.net>:
> If we don't have a fake front, nothing will happen.  The fix was extracted
> from a bigger patch from Francisco Jerez.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=27305
> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
> ---
>  hw/xfree86/dri2/dri2.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index 11442d0..143163d 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -634,6 +634,8 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame,
>     ScreenPtr      pScreen = pDraw->pScreen;
>     DRI2DrawablePtr pPriv;
>     CARD64          ust = 0;
> +    BoxRec          box;
> +    RegionRec       region;
>
>     pPriv = DRI2GetDrawable(pDraw);
>     if (pPriv == NULL) {
> @@ -645,6 +647,14 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame,
>     pPriv->swapsPending--;
>     pPriv->swap_count++;
>
> +    box.x1 = 0;
> +    box.y1 = 0;
> +    box.x2 = pDraw->width;
> +    box.y2 = pDraw->height;
> +    REGION_INIT(pScreen, &region, &box, 0);
> +    DRI2CopyRegion(pDraw, &region, DRI2BufferFakeFrontLeft,
> +                  DRI2BufferFrontLeft);
> +
>     ust = ((CARD64)tv_sec * 1000000) + tv_usec;
>     if (swap_complete)
>        swap_complete(client, swap_data, type, ust, frame, pPriv->swap_count);
> --
> 1.7.0.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list