hw/xwin: Use NULL rather than NoopDDA for unimplemented engine functions

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon Turney 2015-07-31 20:23:59 +01:00
parent a309085a56
commit 9d28ff2a9b
3 changed files with 6 additions and 15 deletions

View File

@ -162,7 +162,6 @@
#include "mipointer.h"
#include "X11/keysym.h"
#include "micoord.h"
#include "dix.h"
#include "miline.h"
#include "shadow.h"
#include "fb.h"

View File

@ -1143,10 +1143,8 @@ winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
pScreenPriv->pwinStoreColors = winStoreColorsShadowGDI;
pScreenPriv->pwinCreateColormap = winCreateColormapShadowGDI;
pScreenPriv->pwinDestroyColormap = winDestroyColormapShadowGDI;
pScreenPriv->pwinCreatePrimarySurface =
(winCreatePrimarySurfaceProcPtr) (void (*)(void)) NoopDDA;
pScreenPriv->pwinReleasePrimarySurface =
(winReleasePrimarySurfaceProcPtr) (void (*)(void)) NoopDDA;
pScreenPriv->pwinCreatePrimarySurface = NULL;
pScreenPriv->pwinReleasePrimarySurface = NULL;
return TRUE;
}

View File

@ -290,22 +290,16 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
* the display dimensions change.
*/
/*
* NOTE: The non-DirectDraw engines set the ReleasePrimarySurface
* and CreatePrimarySurface function pointers to point
* to the no operation function, NoopDDA. This allows us
* to blindly call these functions, even if they are not
* relevant to the current engine (e.g., Shadow GDI).
*/
winDebug
("winWindowProc - WM_DISPLAYCHANGE - Releasing and recreating primary surface\n");
/* Release the old primary surface */
(*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen);
if (*s_pScreenPriv->pwinReleasePrimarySurface)
(*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen);
/* Create the new primary surface */
(*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen);
if (*s_pScreenPriv->pwinCreatePrimarySurface)
(*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen);
}
}