kdrive: Don't bother explicitly clearing new window privates to NULL.
Privates are initially cleared to zero by dixInitPrivates(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
e311318b35
commit
41d4a626c6
|
@ -87,7 +87,6 @@ static int KdXVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr,
|
||||||
|
|
||||||
/* ScreenRec fields */
|
/* ScreenRec fields */
|
||||||
|
|
||||||
static Bool KdXVCreateWindow(WindowPtr pWin);
|
|
||||||
static Bool KdXVDestroyWindow(WindowPtr pWin);
|
static Bool KdXVDestroyWindow(WindowPtr pWin);
|
||||||
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
|
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
|
||||||
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
|
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
|
||||||
|
@ -155,7 +154,6 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
||||||
if (!ScreenPriv)
|
if (!ScreenPriv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ScreenPriv->CreateWindow = pScreen->CreateWindow;
|
|
||||||
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
||||||
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
||||||
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
||||||
|
@ -163,7 +161,6 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
||||||
|
|
||||||
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
||||||
|
|
||||||
pScreen->CreateWindow = KdXVCreateWindow;
|
|
||||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
pScreen->DestroyWindow = KdXVDestroyWindow;
|
||||||
pScreen->WindowExposures = KdXVWindowExposures;
|
pScreen->WindowExposures = KdXVWindowExposures;
|
||||||
pScreen->ClipNotify = KdXVClipNotify;
|
pScreen->ClipNotify = KdXVClipNotify;
|
||||||
|
@ -796,23 +793,6 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
|
||||||
|
|
||||||
/**** ScreenRec fields ****/
|
/**** ScreenRec fields ****/
|
||||||
|
|
||||||
static Bool
|
|
||||||
KdXVCreateWindow(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
pScreen->CreateWindow = ScreenPriv->CreateWindow;
|
|
||||||
ret = (*pScreen->CreateWindow) (pWin);
|
|
||||||
pScreen->CreateWindow = KdXVCreateWindow;
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
KdXVDestroyWindow(WindowPtr pWin)
|
KdXVDestroyWindow(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
@ -977,7 +957,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
if (!ScreenPriv)
|
if (!ScreenPriv)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
pScreen->CreateWindow = ScreenPriv->CreateWindow;
|
|
||||||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
||||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||||
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
||||||
|
|
|
@ -181,7 +181,6 @@ void KdXVDisable(ScreenPtr);
|
||||||
/*** These are DDX layer privates ***/
|
/*** These are DDX layer privates ***/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CreateWindowProcPtr CreateWindow;
|
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
DestroyWindowProcPtr DestroyWindow;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user