diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2015-07-31 20:23:59 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-03-09 16:13:41 +0000 |
commit | 9d28ff2a9be86662f56463aa1fd46d12988e30fa (patch) | |
tree | a1e794e99a0ddc3f1e5f824e82c9010e2191e70c | |
parent | a309085a56de4d30dfbc44d9ff5302c7d9fdbf73 (diff) |
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>
-rw-r--r-- | hw/xwin/win.h | 1 | ||||
-rw-r--r-- | hw/xwin/winshadgdi.c | 6 | ||||
-rw-r--r-- | hw/xwin/winwndproc.c | 14 |
3 files changed, 6 insertions, 15 deletions
diff --git a/hw/xwin/win.h b/hw/xwin/win.h index d72114f01..0574707b0 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -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" diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index c84bf5676..22836c518 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -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; } diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index b3b720bb7..742364372 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -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); } } |