[PATCH 5/6] dix: make Create/Free scratch pixmaps take a ScreenPtr

Keith Packard keithp at keithp.com
Wed May 23 12:37:08 PDT 2012


Dave Airlie <airlied at gmail.com> writes:

> From: Dave Airlie <airlied at redhat.com>
>
> While technically an API/ABI change I doubt anyone uses it,
> but it helps in splitting screens up.

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

>  Bool
> -CreateScratchPixmapsForScreen(int scrnum)
> +CreateScratchPixmapsForScreen(ScreenPtr pScreen)
>  {
>      unsigned int pixmap_size;
>  
>      pixmap_size = sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP);
> -    screenInfo.screens[scrnum]->totalPixmapSize =
> +    pScreen->totalPixmapSize =
>          BitmapBytePad(pixmap_size * 8);
>  
>      /* let it be created on first use */
> -    screenInfo.screens[scrnum]->pScratchPixmap = NULL;
> +    pScreen->pScratchPixmap = NULL;
>      return TRUE;

Might actually consider renaming this function -- it doesn't exactly
create the scratch pixmap, and it also does the pixmap size
computation... Something like InitPixmapsForScreen?

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120523/c50f0a8f/attachment.pgp>


More information about the xorg-devel mailing list