Lines Matching +full:cs +full:- +full:0

45 #include <dix-config.h>
58 CompScreenPtr cs = GetCompScreen(pScreen); in compCloseScreen() local
61 free(cs->alternateVisuals); in compCloseScreen()
63 pScreen->CloseScreen = cs->CloseScreen; in compCloseScreen()
64 pScreen->InstallColormap = cs->InstallColormap; in compCloseScreen()
65 pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; in compCloseScreen()
66 pScreen->ReparentWindow = cs->ReparentWindow; in compCloseScreen()
67 pScreen->ConfigNotify = cs->ConfigNotify; in compCloseScreen()
68 pScreen->MoveWindow = cs->MoveWindow; in compCloseScreen()
69 pScreen->ResizeWindow = cs->ResizeWindow; in compCloseScreen()
70 pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; in compCloseScreen()
72 pScreen->ClipNotify = cs->ClipNotify; in compCloseScreen()
73 pScreen->UnrealizeWindow = cs->UnrealizeWindow; in compCloseScreen()
74 pScreen->RealizeWindow = cs->RealizeWindow; in compCloseScreen()
75 pScreen->DestroyWindow = cs->DestroyWindow; in compCloseScreen()
76 pScreen->CreateWindow = cs->CreateWindow; in compCloseScreen()
77 pScreen->CopyWindow = cs->CopyWindow; in compCloseScreen()
78 pScreen->PositionWindow = cs->PositionWindow; in compCloseScreen()
80 pScreen->GetImage = cs->GetImage; in compCloseScreen()
81 pScreen->GetSpans = cs->GetSpans; in compCloseScreen()
82 pScreen->SourceValidate = cs->SourceValidate; in compCloseScreen()
84 free(cs); in compCloseScreen()
85 dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); in compCloseScreen()
86 ret = (*pScreen->CloseScreen) (pScreen); in compCloseScreen()
94 VisualPtr pVisual = pColormap->pVisual; in compInstallColormap()
95 ScreenPtr pScreen = pColormap->pScreen; in compInstallColormap()
96 CompScreenPtr cs = GetCompScreen(pScreen); in compInstallColormap() local
99 for (a = 0; a < cs->numAlternateVisuals; a++) in compInstallColormap()
100 if (pVisual->vid == cs->alternateVisuals[a]) in compInstallColormap()
102 pScreen->InstallColormap = cs->InstallColormap; in compInstallColormap()
103 (*pScreen->InstallColormap) (pColormap); in compInstallColormap()
104 cs->InstallColormap = pScreen->InstallColormap; in compInstallColormap()
105 pScreen->InstallColormap = compInstallColormap; in compInstallColormap()
111 if (pWin->backingStore != NotUseful && !pWin->backStorage) { in compCheckBackingStore()
113 pWin->backStorage = TRUE; in compCheckBackingStore()
115 else if (pWin->backingStore == NotUseful && pWin->backStorage) { in compCheckBackingStore()
118 pWin->backStorage = FALSE; in compCheckBackingStore()
126 ScreenPtr pScreen = pWin->drawable.pScreen; in compChangeWindowAttributes()
127 CompScreenPtr cs = GetCompScreen(pScreen); in compChangeWindowAttributes() local
130 pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; in compChangeWindowAttributes()
131 ret = pScreen->ChangeWindowAttributes(pWin, mask); in compChangeWindowAttributes()
134 pScreen->backingStoreSupport != NotUseful) in compChangeWindowAttributes()
137 pScreen->ChangeWindowAttributes = compChangeWindowAttributes; in compChangeWindowAttributes()
148 ScreenPtr pScreen = pDrawable->pScreen; in compGetImage()
149 CompScreenPtr cs = GetCompScreen(pScreen); in compGetImage() local
151 pScreen->GetImage = cs->GetImage; in compGetImage()
152 if (pDrawable->type == DRAWABLE_WINDOW) in compGetImage()
154 (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine); in compGetImage()
155 cs->GetImage = pScreen->GetImage; in compGetImage()
156 pScreen->GetImage = compGetImage; in compGetImage()
163 ScreenPtr pScreen = pDrawable->pScreen; in compGetSpans()
164 CompScreenPtr cs = GetCompScreen(pScreen); in compGetSpans() local
166 pScreen->GetSpans = cs->GetSpans; in compGetSpans()
167 if (pDrawable->type == DRAWABLE_WINDOW) in compGetSpans()
169 (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); in compGetSpans()
170 cs->GetSpans = pScreen->GetSpans; in compGetSpans()
171 pScreen->GetSpans = compGetSpans; in compGetSpans()
179 ScreenPtr pScreen = pDrawable->pScreen; in compSourceValidate()
180 CompScreenPtr cs = GetCompScreen(pScreen); in compSourceValidate() local
182 pScreen->SourceValidate = cs->SourceValidate; in compSourceValidate()
183 if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors) in compSourceValidate()
185 if (pScreen->SourceValidate) in compSourceValidate()
186 (*pScreen->SourceValidate) (pDrawable, x, y, width, height, in compSourceValidate()
188 cs->SourceValidate = pScreen->SourceValidate; in compSourceValidate()
189 pScreen->SourceValidate = compSourceValidate; in compSourceValidate()
193 * Add alternate visuals -- always expose an ARGB32 and RGB24 visual
201 for (i = 0; i < pScreen->numDepths; i++) { in compFindVisuallessDepth()
202 DepthPtr depth = &pScreen->allowedDepths[i]; in compFindVisuallessDepth()
204 if (depth->depth == d) { in compFindVisuallessDepth()
208 if (depth->numVids) in compFindVisuallessDepth()
209 return 0; in compFindVisuallessDepth()
220 return 0; in compFindVisuallessDepth()
227 compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals) in compRegisterAlternateVisuals() argument
231 p = reallocarray(cs->alternateVisuals, in compRegisterAlternateVisuals()
232 cs->numAlternateVisuals + nVisuals, sizeof(VisualID)); in compRegisterAlternateVisuals()
236 memcpy(&p[cs->numAlternateVisuals], vids, sizeof(VisualID) * nVisuals); in compRegisterAlternateVisuals()
238 cs->alternateVisuals = p; in compRegisterAlternateVisuals()
239 cs->numAlternateVisuals += nVisuals; in compRegisterAlternateVisuals()
248 CompScreenPtr cs = GetCompScreen(pScreen); in CompositeRegisterAlternateVisuals() local
250 return compRegisterAlternateVisuals(cs, vids, nVisuals); in CompositeRegisterAlternateVisuals()
258 CompScreenPtr cs = GetCompScreen(pScreen); in CompositeRegisterImplicitRedirectionException() local
261 p = reallocarray(cs->implicitRedirectExceptions, in CompositeRegisterImplicitRedirectionException()
262 cs->numImplicitRedirectExceptions + 1, sizeof(p[0])); in CompositeRegisterImplicitRedirectionException()
266 p[cs->numImplicitRedirectExceptions].parentVisual = parentVisual; in CompositeRegisterImplicitRedirectionException()
267 p[cs->numImplicitRedirectExceptions].winVisual = winVisual; in CompositeRegisterImplicitRedirectionException()
269 cs->implicitRedirectExceptions = p; in CompositeRegisterImplicitRedirectionException()
270 cs->numImplicitRedirectExceptions++; in CompositeRegisterImplicitRedirectionException()
288 compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, in compAddAlternateVisual() argument
301 if (alt->depth >= pScreen->rootDepth && alt->depth != 32) in compAddAlternateVisual()
304 depth = compFindVisuallessDepth(pScreen, alt->depth); in compAddAlternateVisual()
306 /* alt->depth doesn't exist or already has alternate visuals. */ in compAddAlternateVisual()
309 pPictFormat = PictureMatchFormat(pScreen, alt->depth, alt->format); in compAddAlternateVisual()
317 visual = pScreen->visuals + (pScreen->numVisuals - 1); /* the new one */ in compAddAlternateVisual()
320 visual->bitsPerRGBValue = 8; in compAddAlternateVisual()
321 if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { in compAddAlternateVisual()
322 visual->class = PseudoColor; in compAddAlternateVisual()
323 visual->nplanes = PICT_FORMAT_BPP(alt->format); in compAddAlternateVisual()
324 visual->ColormapEntries = 1 << visual->nplanes; in compAddAlternateVisual()
327 DirectFormatRec *direct = &pPictFormat->direct; in compAddAlternateVisual()
329 visual->class = TrueColor; in compAddAlternateVisual()
330 visual->redMask = ((unsigned long) direct->redMask) << direct->red; in compAddAlternateVisual()
331 visual->greenMask = in compAddAlternateVisual()
332 ((unsigned long) direct->greenMask) << direct->green; in compAddAlternateVisual()
333 visual->blueMask = ((unsigned long) direct->blueMask) << direct->blue; in compAddAlternateVisual()
334 alphaMask = ((unsigned long) direct->alphaMask) << direct->alpha; in compAddAlternateVisual()
335 visual->offsetRed = direct->red; in compAddAlternateVisual()
336 visual->offsetGreen = direct->green; in compAddAlternateVisual()
337 visual->offsetBlue = direct->blue; in compAddAlternateVisual()
342 visual->nplanes = Ones(visual->redMask | in compAddAlternateVisual()
343 visual->greenMask | in compAddAlternateVisual()
344 visual->blueMask | alphaMask); in compAddAlternateVisual()
346 visual->ColormapEntries = (1 << max(Ones(visual->redMask), in compAddAlternateVisual()
347 max(Ones(visual->greenMask), in compAddAlternateVisual()
348 Ones(visual->blueMask)))); in compAddAlternateVisual()
351 /* remember the visual ID to detect auto-update windows */ in compAddAlternateVisual()
352 compRegisterAlternateVisuals(cs, &visual->vid, 1); in compAddAlternateVisual()
358 compAddAlternateVisuals(ScreenPtr pScreen, CompScreenPtr cs) in compAddAlternateVisuals() argument
360 int alt, ret = 0; in compAddAlternateVisuals()
362 for (alt = 0; alt < ARRAY_SIZE(altVisuals); alt++) in compAddAlternateVisuals()
363 ret |= compAddAlternateVisual(pScreen, cs, altVisuals + alt); in compAddAlternateVisuals()
371 CompScreenPtr cs; in compScreenInit() local
373 if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) in compScreenInit()
375 if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) in compScreenInit()
377 if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0)) in compScreenInit()
382 cs = (CompScreenPtr) malloc(sizeof(CompScreenRec)); in compScreenInit()
383 if (!cs) in compScreenInit()
386 cs->overlayWid = FakeClientID(0); in compScreenInit()
387 cs->pOverlayWin = NULL; in compScreenInit()
388 cs->pOverlayClients = NULL; in compScreenInit()
390 cs->pendingScreenUpdate = FALSE; in compScreenInit()
392 cs->numAlternateVisuals = 0; in compScreenInit()
393 cs->alternateVisuals = NULL; in compScreenInit()
394 cs->numImplicitRedirectExceptions = 0; in compScreenInit()
395 cs->implicitRedirectExceptions = NULL; in compScreenInit()
397 if (!compAddAlternateVisuals(pScreen, cs)) { in compScreenInit()
398 free(cs); in compScreenInit()
403 pScreen->backingStoreSupport = WhenMapped; in compScreenInit()
405 cs->PositionWindow = pScreen->PositionWindow; in compScreenInit()
406 pScreen->PositionWindow = compPositionWindow; in compScreenInit()
408 cs->CopyWindow = pScreen->CopyWindow; in compScreenInit()
409 pScreen->CopyWindow = compCopyWindow; in compScreenInit()
411 cs->CreateWindow = pScreen->CreateWindow; in compScreenInit()
412 pScreen->CreateWindow = compCreateWindow; in compScreenInit()
414 cs->DestroyWindow = pScreen->DestroyWindow; in compScreenInit()
415 pScreen->DestroyWindow = compDestroyWindow; in compScreenInit()
417 cs->RealizeWindow = pScreen->RealizeWindow; in compScreenInit()
418 pScreen->RealizeWindow = compRealizeWindow; in compScreenInit()
420 cs->UnrealizeWindow = pScreen->UnrealizeWindow; in compScreenInit()
421 pScreen->UnrealizeWindow = compUnrealizeWindow; in compScreenInit()
423 cs->ClipNotify = pScreen->ClipNotify; in compScreenInit()
424 pScreen->ClipNotify = compClipNotify; in compScreenInit()
426 cs->ConfigNotify = pScreen->ConfigNotify; in compScreenInit()
427 pScreen->ConfigNotify = compConfigNotify; in compScreenInit()
429 cs->MoveWindow = pScreen->MoveWindow; in compScreenInit()
430 pScreen->MoveWindow = compMoveWindow; in compScreenInit()
432 cs->ResizeWindow = pScreen->ResizeWindow; in compScreenInit()
433 pScreen->ResizeWindow = compResizeWindow; in compScreenInit()
435 cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; in compScreenInit()
436 pScreen->ChangeBorderWidth = compChangeBorderWidth; in compScreenInit()
438 cs->ReparentWindow = pScreen->ReparentWindow; in compScreenInit()
439 pScreen->ReparentWindow = compReparentWindow; in compScreenInit()
441 cs->InstallColormap = pScreen->InstallColormap; in compScreenInit()
442 pScreen->InstallColormap = compInstallColormap; in compScreenInit()
444 cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; in compScreenInit()
445 pScreen->ChangeWindowAttributes = compChangeWindowAttributes; in compScreenInit()
447 cs->CloseScreen = pScreen->CloseScreen; in compScreenInit()
448 pScreen->CloseScreen = compCloseScreen; in compScreenInit()
450 cs->GetImage = pScreen->GetImage; in compScreenInit()
451 pScreen->GetImage = compGetImage; in compScreenInit()
453 cs->GetSpans = pScreen->GetSpans; in compScreenInit()
454 pScreen->GetSpans = compGetSpans; in compScreenInit()
456 cs->SourceValidate = pScreen->SourceValidate; in compScreenInit()
457 pScreen->SourceValidate = compSourceValidate; in compScreenInit()
459 dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs); in compScreenInit()