hw/xwin: Remove Shadow DirectDraw engine

Maybe a long time ago this made some kind of sense, but now there's no good
reason to ever use this, rather than the Shadow DirectDraw NonLocking engine.

Also remove screen private data members used by other removed engines.

Also remove no longer needed OS version check in winDetectSupportedEngines()

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 2014-11-06 15:22:58 +00:00
parent 55a84be085
commit 7a22912edb
8 changed files with 5 additions and 1287 deletions

View File

@ -738,7 +738,6 @@ winUseMsg(void)
ErrorF("-engine engine_type_id\n"
"\tOverride the server's automatically selected engine type:\n"
"\t\t1 - Shadow GDI\n"
"\t\t2 - Shadow DirectDraw\n"
"\t\t4 - Shadow DirectDraw4 Non-Locking\n"
);

View File

@ -76,7 +76,6 @@ SRCS = InitInput.c \
winprefslex.l \
winprocarg.c \
winscrinit.c \
winshaddd.c \
winshadddnl.c \
winshadgdi.c \
wintaskbar.c \

View File

@ -248,9 +248,6 @@ functionality does not provide a benefit at any number of boxes; we
can only determine the usefulness of this feature through testing.
This option probably has limited effect on current \fIWindows\fP versions
as they already perform GDI batching.
This parameter works in conjunction with engines 1, 2, and 4 (Shadow
GDI, Shadow DirectDraw, and Shadow DirectDraw Non-Locking,
respectively).
.TP 8
.B "\-engine \fIengine_type_id\fP"
This option, which is intended for Cygwin/X developers,
@ -265,8 +262,6 @@ The engine type ids are:
.RS
.IP 1 4
Shadow GDI
.IP 2 4
Shadow DirectDraw
.IP 4 4
Shadow DirectDraw Non-Locking
.RE

View File

@ -101,7 +101,6 @@
#define WIN_SERVER_NONE 0x0L /* 0 */
#define WIN_SERVER_SHADOW_GDI 0x1L /* 1 */
#define WIN_SERVER_SHADOW_DD 0x2L /* 2 */
#define WIN_SERVER_SHADOW_DDNL 0x4L /* 4 */
#define AltMapIndex Mod1MapIndex
@ -468,35 +467,20 @@ typedef struct _winPrivScreenRec {
int iE3BCachedPress;
Bool fE3BFakeButton2Sent;
/* Privates used by shadow fb GDI server */
/* Privates used by shadow fb GDI engine */
HBITMAP hbmpShadow;
HDC hdcScreen;
HDC hdcShadow;
HWND hwndScreen;
BITMAPINFOHEADER *pbmih;
/* Privates used by shadow fb and primary fb DirectDraw servers */
/* Privates used by shadow fb DirectDraw Nonlocking engine */
LPDIRECTDRAW pdd;
LPDIRECTDRAWSURFACE2 pddsPrimary;
LPDIRECTDRAW2 pdd2;
/* Privates used by shadow fb DirectDraw server */
LPDIRECTDRAWSURFACE2 pddsShadow;
LPDDSURFACEDESC pddsdShadow;
/* Privates used by primary fb DirectDraw server */
LPDIRECTDRAWSURFACE2 pddsOffscreen;
LPDDSURFACEDESC pddsdOffscreen;
LPDDSURFACEDESC pddsdPrimary;
/* Privates used by shadow fb DirectDraw Nonlocking server */
LPDIRECTDRAW4 pdd4;
LPDIRECTDRAWSURFACE4 pddsShadow4;
LPDIRECTDRAWSURFACE4 pddsPrimary4;
BOOL fRetryCreateSurface;
/* Privates used by both shadow fb DirectDraw servers */
LPDIRECTDRAWCLIPPER pddcPrimary;
BOOL fRetryCreateSurface;
#ifdef XWIN_MULTIWINDOWEXTWM
/* Privates used by multi-window external window manager */
@ -920,13 +904,6 @@ Bool
Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
/*
* winshaddd.c
*/
Bool
winSetEngineFunctionsShadowDD(ScreenPtr pScreen);
/*
* winshadddnl.c
*/

View File

@ -54,16 +54,9 @@ static HMODULE g_hmodDirectDraw = NULL;
void
winDetectSupportedEngines(void)
{
OSVERSIONINFO osvi;
/* Initialize the engine support flags */
g_dwEnginesSupported = WIN_SERVER_SHADOW_GDI;
/* Get operating system version information */
ZeroMemory(&osvi, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionEx(&osvi);
/* Do we have DirectDraw? */
if (g_hmodDirectDraw != NULL) {
LPDIRECTDRAW lpdd = NULL;
@ -85,12 +78,6 @@ winDetectSupportedEngines(void)
"winDetectSupportedEngines - DirectDraw not installed\n");
return;
}
else {
/* We have DirectDraw */
winErrorFVerb(2,
"winDetectSupportedEngines - DirectDraw installed, allowing ShadowDD\n");
g_dwEnginesSupported |= WIN_SERVER_SHADOW_DD;
}
/* Try to query for DirectDraw4 interface */
ddrval = IDirectDraw_QueryInterface(lpdd,
@ -187,9 +174,6 @@ winSetEngine(ScreenPtr pScreen)
case WIN_SERVER_SHADOW_GDI:
winSetEngineFunctionsShadowGDI(pScreen);
break;
case WIN_SERVER_SHADOW_DD:
winSetEngineFunctionsShadowDD(pScreen);
break;
case WIN_SERVER_SHADOW_DDNL:
winSetEngineFunctionsShadowDDNL(pScreen);
break;
@ -209,16 +193,6 @@ winSetEngine(ScreenPtr pScreen)
return TRUE;
}
/* ShadowDD is next in line */
if (g_dwEnginesSupported & WIN_SERVER_SHADOW_DD) {
winErrorFVerb(2, "winSetEngine - Using Shadow DirectDraw\n");
pScreenInfo->dwEngine = WIN_SERVER_SHADOW_DD;
/* Set engine function pointers */
winSetEngineFunctionsShadowDD(pScreen);
return TRUE;
}
/* ShadowGDI is next in line */
if (g_dwEnginesSupported & WIN_SERVER_SHADOW_GDI) {
winErrorFVerb(2, "winSetEngine - Using Shadow GDI DIB\n");

View File

@ -313,8 +313,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
if (pScreenInfo->dwDepth == 8
&& (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
|| (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL
&& pScreenInfo->fFullScreen)
|| (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DD
&& pScreenInfo->fFullScreen))) {
winSetColormapFunctions(pScreen);
@ -388,7 +386,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
/* Initialize the shadow framebuffer layer */
if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI
|| pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DD
|| pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)
#ifdef XWIN_MULTIWINDOWEXTWM
&& !pScreenInfo->fMWExtWM

File diff suppressed because it is too large Load Diff

View File

@ -162,8 +162,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
* their own mode when they become active.
*/
if (s_pScreenInfo->fFullScreen
&& (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DD
|| s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
|| (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
break;
}
@ -186,8 +185,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
*/
if (s_pScreenInfo->dwBPP !=
GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)) {
if ((s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DD ||
s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) {
if (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL) {
/* Cannot display the visual until the depth is restored */
ErrorF("winWindowProc - Disruptive change in depth\n");