dix/render: consolidate window format matching code.
This code existed in 3 different forms, perhaps it should be consolidated. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
committed by
Keith Packard
parent
a7b97b0fa8
commit
957bf959fb
13
dix/window.c
13
dix/window.c
@@ -3660,3 +3660,16 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
|
||||
WindowsRestructured();
|
||||
FlushAllOutput();
|
||||
}
|
||||
|
||||
VisualPtr
|
||||
WindowGetVisual(WindowPtr pWin)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
VisualID vid = wVisual(pWin);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < pScreen->numVisuals; i++)
|
||||
if (pScreen->visuals[i].vid == vid)
|
||||
return &pScreen->visuals[i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user