/* Screen initialization/teardown */ void miInitializeCompositeWrapper(ScreenPtr pScreen) { cwScreenPtr pScreenPriv; #ifdef RENDER Bool has_render = GetPictureScreenIfSet(pScreen) != NULL; #endif if (!dixRequestPrivate(cwGCKey, sizeof(cwGCRec))) return; pScreenPriv = xalloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; dixSetPrivate(&pScreen->devPrivates, cwScreenKey, pScreenPriv); SCREEN_EPILOGUE(pScreen, CloseScreen, cwCloseScreen); SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage); SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans); SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC); SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow); SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap); #ifdef RENDER if (has_render) cwInitializeRender(pScreen); #endif }
/* Screen initialization/teardown */ void miInitializeCompositeWrapper(ScreenPtr pScreen) { cwScreenPtr pScreenPriv; if (cwDisabled[pScreen->myNum]) return; if (cwGeneration != serverGeneration) { cwScreenIndex = AllocateScreenPrivateIndex(); if (cwScreenIndex < 0) return; cwGCIndex = AllocateGCPrivateIndex(); cwWindowIndex = AllocateWindowPrivateIndex(); #ifdef RENDER cwPictureIndex = AllocatePicturePrivateIndex(); #endif cwGeneration = serverGeneration; } if (!AllocateGCPrivate(pScreen, cwGCIndex, sizeof(cwGCRec))) return; if (!AllocateWindowPrivate(pScreen, cwWindowIndex, 0)) return; #ifdef RENDER if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0)) return; #endif pScreenPriv = (cwScreenPtr)xalloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; pScreen->devPrivates[cwScreenIndex].ptr = (pointer)pScreenPriv; SCREEN_EPILOGUE(pScreen, CloseScreen, cwCloseScreen); SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage); SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans); SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC); SCREEN_EPILOGUE(pScreen, PaintWindowBackground, cwPaintWindowBackground); SCREEN_EPILOGUE(pScreen, PaintWindowBorder, cwPaintWindowBorder); SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow); SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap); #ifdef RENDER if (GetPictureScreen (pScreen)) cwInitializeRender(pScreen); #endif }
/* Screen initialization/teardown */ void miInitializeCompositeWrapper(ScreenPtr pScreen) { cwScreenPtr pScreenPriv; Bool has_render = GetPictureScreenIfSet(pScreen) != NULL; if (!dixRegisterPrivateKey(&cwScreenKeyRec, PRIVATE_SCREEN, 0)) return; if (!dixRegisterPrivateKey(&cwGCKeyRec, PRIVATE_GC, sizeof(cwGCRec))) return; if (!dixRegisterPrivateKey(&cwWindowKeyRec, PRIVATE_WINDOW, 0)) return; if (!dixRegisterPrivateKey(&cwPictureKeyRec, PRIVATE_PICTURE, 0)) return; pScreenPriv = malloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; dixSetPrivate(&pScreen->devPrivates, cwScreenKey, pScreenPriv); SCREEN_EPILOGUE(pScreen, CloseScreen, cwCloseScreen); SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage); SCREEN_EPILOGUE(pScreen, GetSpans, cwGetSpans); SCREEN_EPILOGUE(pScreen, CreateGC, cwCreateGC); SCREEN_EPILOGUE(pScreen, CopyWindow, cwCopyWindow); SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap); if (has_render) cwInitializeRender(pScreen); }