[PATCH 1/2] Always call the flush callback chain when we might send out damage events

Kristian Høgsberg krh at bitplanet.net
Sun Aug 1 11:39:46 PDT 2010


Before this gets drowned out in janitorial patches... Keith, do you
want a pull request for this and the damageext patch?  Did you have
have a look at the damage change?

Kristian

2010/7/29 Kristian Høgsberg <krh at bitplanet.net>:
> We were missing the callback in a couple of places.  Drivers may use
> the flush callback to submit batched up rendering before events (for
> example, damage events) are sent out, to ensure that the rendering
> has happend when the client receives the event.
>
> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
> ---
>  os/connection.c |    3 +++
>  os/io.c         |    4 ++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/os/connection.c b/os/connection.c
> index c143fb6..77910be 100644
> --- a/os/connection.c
> +++ b/os/connection.c
> @@ -1033,6 +1033,9 @@ CloseDownConnection(ClientPtr client)
>  {
>     OsCommPtr oc = (OsCommPtr)client->osPrivate;
>
> +    if (FlushCallback)
> +       CallCallbacks(&FlushCallback, NULL);
> +
>     if (oc->output && oc->output->count)
>        FlushClient(client, oc, (char *)NULL, 0);
>  #ifdef XDMCP
> diff --git a/os/io.c b/os/io.c
> index b5f98b7..e2df2e3 100644
> --- a/os/io.c
> +++ b/os/io.c
> @@ -819,6 +819,10 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
>          CriticalOutputPending = FALSE;
>          NewOutputPending = FALSE;
>        }
> +
> +       if (FlushCallback)
> +           CallCallbacks(&FlushCallback, NULL);
> +
>        return FlushClient(who, oc, buf, count);
>     }
>
> --
> 1.7.2
>
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
> Your subscription address: krh at bitplanet.net



More information about the xorg mailing list