xfree86: modeset: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just miCreateResources() anyway - so we can call it directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
1c3150f507
commit
66e1b34a88
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#include "config/hotplug_priv.h"
|
#include "config/hotplug_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "mi/mi_priv.h"
|
||||||
|
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
@ -1744,18 +1745,15 @@ msStopFlippingPixmapTracking(DrawablePtr src,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
CreateScreenResources(ScreenPtr pScreen)
|
modsetCreateScreenResources(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
PixmapPtr rootPixmap;
|
PixmapPtr rootPixmap;
|
||||||
Bool ret;
|
|
||||||
void *pixels = NULL;
|
void *pixels = NULL;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
pScreen->CreateScreenResources = ms->createScreenResources;
|
Bool ret = miCreateScreenResources(pScreen);
|
||||||
ret = pScreen->CreateScreenResources(pScreen);
|
|
||||||
pScreen->CreateScreenResources = CreateScreenResources;
|
|
||||||
|
|
||||||
if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE))
|
if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2057,8 +2055,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ms->createScreenResources = pScreen->CreateScreenResources;
|
pScreen->CreateScreenResources = modsetCreateScreenResources;
|
||||||
pScreen->CreateScreenResources = CreateScreenResources;
|
|
||||||
|
|
||||||
xf86SetBlackWhitePixels(pScreen);
|
xf86SetBlackWhitePixels(pScreen);
|
||||||
|
|
||||||
|
@ -2325,7 +2322,6 @@ CloseScreen(ScreenPtr pScreen)
|
||||||
LeaveVT(pScrn);
|
LeaveVT(pScrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
pScreen->CreateScreenResources = ms->createScreenResources;
|
|
||||||
pScreen->BlockHandler = ms->BlockHandler;
|
pScreen->BlockHandler = ms->BlockHandler;
|
||||||
|
|
||||||
pScrn->vtSema = FALSE;
|
pScrn->vtSema = FALSE;
|
||||||
|
|
|
@ -108,7 +108,6 @@ typedef struct _modesettingRec {
|
||||||
CreateWindowProcPtr CreateWindow;
|
CreateWindowProcPtr CreateWindow;
|
||||||
unsigned int SaveGeneration;
|
unsigned int SaveGeneration;
|
||||||
|
|
||||||
CreateScreenResourcesProcPtr createScreenResources;
|
|
||||||
ScreenBlockHandlerProcPtr BlockHandler;
|
ScreenBlockHandlerProcPtr BlockHandler;
|
||||||
miPointerSpriteFuncPtr SpriteFuncs;
|
miPointerSpriteFuncPtr SpriteFuncs;
|
||||||
void *driver;
|
void *driver;
|
||||||
|
|
|
@ -53,7 +53,10 @@ void miWindowExposures(WindowPtr pWin, RegionPtr prgn);
|
||||||
void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what);
|
void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what);
|
||||||
void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h,
|
void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||||
unsigned int subWindowMode);
|
unsigned int subWindowMode);
|
||||||
Bool miCreateScreenResources(ScreenPtr pScreen);
|
|
||||||
|
/* only exported for modesetting, not for external drivers (yet) */
|
||||||
|
_X_EXPORT Bool miCreateScreenResources(ScreenPtr pScreen);
|
||||||
|
|
||||||
int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect,
|
int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind);
|
int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind);
|
||||||
|
|
Loading…
Reference in New Issue