static PictFormatPtr compWindowFormat (WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; return PictureMatchVisual (pScreen, pWin->drawable.depth, compGetWindowVisual (pWin)); }
static PicturePtr miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, WindowPtr pWin) { ScreenPtr pScreen = pDraw->pScreen; VisualPtr pVisual; PictFormatPtr pFormat; XID subwindow_mode = IncludeInferiors; PicturePtr pPicture; int error; pVisual = miDCGetWindowVisual (pWin); if (!pVisual) return 0; pFormat = PictureMatchVisual (pScreen, pDraw->depth, pVisual); if (!pFormat) return 0; pPicture = CreatePicture (0, pDraw, pFormat, CPSubwindowMode, &subwindow_mode, serverClient, &error); *ppPicture = pPicture; return pPicture; }