mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Cygwin/X: update for changes to shadow framebuffer
Bring Cygwin/X up to date with the change to damage-based shadow framebuffer. Register the screen bitmap as the shadow framebuffer after screen resources are created. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
@@ -313,6 +313,7 @@ typedef Bool (*winReleasePrimarySurfaceProcPtr)(ScreenPtr);
|
||||
|
||||
typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
|
||||
|
||||
typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
|
||||
|
||||
/* Typedef for DIX wrapper functions */
|
||||
typedef int (*winDispatchProcPtr) (ClientPtr);
|
||||
@@ -563,6 +564,8 @@ typedef struct _winPrivScreenRec
|
||||
winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface;
|
||||
winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface;
|
||||
|
||||
winCreateScreenResourcesProc pwinCreateScreenResources;
|
||||
|
||||
#ifdef XWIN_MULTIWINDOW
|
||||
/* Window Procedures for MultiWindow mode */
|
||||
winFinishCreateWindowsWindowProcPtr pwinFinishCreateWindowsWindow;
|
||||
|
||||
@@ -244,6 +244,25 @@ winScreenInit (int index,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
winCreateScreenResources(ScreenPtr pScreen)
|
||||
{
|
||||
winScreenPriv(pScreen);
|
||||
Bool result;
|
||||
|
||||
result = pScreenPriv->pwinCreateScreenResources(pScreen);
|
||||
|
||||
/* Now the screen bitmap has been wrapped in a pixmap,
|
||||
add that to the Shadow framebuffer */
|
||||
if (!shadowAdd(pScreen, pScreen->devPrivate,
|
||||
pScreenPriv->pwinShadowUpdate, NULL, 0, 0))
|
||||
{
|
||||
ErrorF ("winCreateScreenResources - shadowAdd () failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* See Porting Layer Definition - p. 20 */
|
||||
Bool
|
||||
@@ -427,15 +446,18 @@ winFinishScreenInitFB (int index,
|
||||
)
|
||||
{
|
||||
#if CYGDEBUG
|
||||
winDebug ("winFinishScreenInitFB - Calling shadowInit ()\n");
|
||||
winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n");
|
||||
#endif
|
||||
if (!shadowInit (pScreen,
|
||||
pScreenPriv->pwinShadowUpdate,
|
||||
NULL))
|
||||
if (!shadowSetup(pScreen))
|
||||
{
|
||||
ErrorF ("winFinishScreenInitFB - shadowInit () failed\n");
|
||||
ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Wrap CreateScreenResources so we can add the screen pixmap
|
||||
to the Shadow framebuffer after it's been created */
|
||||
pScreenPriv->pwinCreateScreenResources = pScreen->CreateScreenResources;
|
||||
pScreen->CreateScreenResources = winCreateScreenResources;
|
||||
}
|
||||
|
||||
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||
|
||||
@@ -508,7 +508,7 @@ winShadowUpdateDD (ScreenPtr pScreen,
|
||||
{
|
||||
winScreenPriv(pScreen);
|
||||
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
||||
RegionPtr damage = &pBuf->damage;
|
||||
RegionPtr damage = shadowDamage(pBuf);
|
||||
HRESULT ddrval = DD_OK;
|
||||
RECT rcDest, rcSrc;
|
||||
POINT ptOrigin;
|
||||
|
||||
@@ -584,7 +584,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
|
||||
{
|
||||
winScreenPriv(pScreen);
|
||||
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
||||
RegionPtr damage = &pBuf->damage;
|
||||
RegionPtr damage = shadowDamage(pBuf);
|
||||
HRESULT ddrval = DD_OK;
|
||||
RECT rcDest, rcSrc;
|
||||
POINT ptOrigin;
|
||||
|
||||
@@ -498,7 +498,7 @@ winShadowUpdateGDI (ScreenPtr pScreen,
|
||||
{
|
||||
winScreenPriv(pScreen);
|
||||
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
||||
RegionPtr damage = &pBuf->damage;
|
||||
RegionPtr damage = shadowDamage(pBuf);
|
||||
DWORD dwBox = REGION_NUM_RECTS (damage);
|
||||
BoxPtr pBox = REGION_RECTS (damage);
|
||||
int x, y, w, h;
|
||||
|
||||
Reference in New Issue
Block a user