[PATCH] glamor: use screen blockhandler rather than dix one (v2)

Keith Packard keithp at keithp.com
Thu Jan 22 22:28:11 PST 2015


Dave Airlie <airlied at gmail.com> writes:

> From: Dave Airlie <airlied at redhat.com>
>
> This adds glamor into the block handler call chain
> in the correct place.
>
> This should fix interactions between glamor and drivers
> requiring damage from glamor.
>
> v2: okay don't consolidate, just leave things wierd for now
> remove blcokhandler in screen close.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  glamor/glamor.c      | 22 ++++++++++------------
>  glamor/glamor_priv.h |  1 +
>  2 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/glamor/glamor.c b/glamor/glamor.c
> index 78e8278..f96abcc 100644
> --- a/glamor/glamor.c
> +++ b/glamor/glamor.c
> @@ -249,20 +249,19 @@ glamor_block_handler(ScreenPtr screen)
>  }
>  
>  static void
> -_glamor_block_handler(void *data, OSTimePtr timeout, void *last_select_mask)
> +_glamor_block_handler(ScreenPtr screen, void *timeout, void *readmask)
>  {
> -    glamor_screen_private *glamor_priv = data;
> +    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
> +
> +    screen->BlockHandler = glamor_priv->saved_procs.block_handler;
> +    screen->BlockHandler(screen, timeout, readmask);

You'll need to add:

       glamor_priv->saved_procs.block_handler = screen->BlockHandler

in case the block handler chain was modified during that call.

Otherwise, this is

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150122/b9370906/attachment.sig>


More information about the xorg-devel mailing list