Commit 860cf251 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winex11.drv: The 'lossy' parameter is always false so remove it.

parent bc2a4dbe
......@@ -1542,7 +1542,7 @@ BOOL X11DRV_PatBlt( X11DRV_PDEVICE *physDev, INT left, INT top, INT width, INT h
{
BOOL result;
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
result = BITBLT_InternalStretchBlt( physDev, left, top, width, height, NULL, 0, 0, 0, 0, rop );
X11DRV_UnlockDIBSection( physDev, TRUE );
return result;
......@@ -1689,9 +1689,9 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
* which may avoid a copy in some situations */
}
sDst = X11DRV_LockDIBSection( physDevDst, DIB_Status_None, FALSE );
sDst = X11DRV_LockDIBSection( physDevDst, DIB_Status_None );
if (physDevDst != physDevSrc)
sSrc = X11DRV_LockDIBSection( physDevSrc, DIB_Status_None, FALSE );
sSrc = X11DRV_LockDIBSection( physDevSrc, DIB_Status_None );
else
sSrc = sDst;
......@@ -1740,7 +1740,7 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
goto END;
/* fall back to X server copying */
}
X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod, FALSE );
X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod );
wine_tsx11_lock();
XSetFunction( gdi_display, physDevDst->gc, GXcopy );
......@@ -1751,9 +1751,9 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
goto END;
}
X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod, FALSE );
X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod );
if (physDevDst != physDevSrc)
X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod, FALSE );
X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod );
result = BITBLT_InternalStretchBlt( physDevDst, xDst, yDst, width, height,
physDevSrc, xSrc, ySrc, width, height, rop );
......@@ -1777,9 +1777,9 @@ BOOL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
{
BOOL result;
X11DRV_LockDIBSection( physDevDst, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDevDst, DIB_Status_GdiMod );
if (physDevDst != physDevSrc)
X11DRV_LockDIBSection( physDevSrc, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDevSrc, DIB_Status_GdiMod );
result = BITBLT_InternalStretchBlt( physDevDst, xDst, yDst, widthDst, heightDst,
physDevSrc, xSrc, ySrc, widthSrc, heightSrc, rop );
......
......@@ -97,8 +97,8 @@ enum Rle_EscapeCodes
};
static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *,INT,BOOL);
static INT X11DRV_DIB_Lock(X_PHYSBITMAP *,INT,BOOL);
static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *,INT);
static INT X11DRV_DIB_Lock(X_PHYSBITMAP *,INT);
static void X11DRV_DIB_Unlock(X_PHYSBITMAP *,BOOL);
/*
......@@ -3799,7 +3799,7 @@ INT X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDest, DWO
if (!cx || !cy) return lines;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
X11DRV_SetupGCForText( physDev ); /* To have the correct colors */
wine_tsx11_lock();
......@@ -3939,7 +3939,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
descr.height = lines;
descr.useShm = FALSE;
descr.dibpitch = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8;
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod, FALSE );
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod );
result = X11DRV_DIB_SetImageBits( &descr );
X11DRV_DIB_Unlock( physBitmap, TRUE );
......@@ -4069,7 +4069,7 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
descr.dibpitch = (obj_size == sizeof(DIBSECTION)) ? dib.dsBm.bmWidthBytes
: (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod, FALSE );
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod );
X11DRV_DIB_GetImageBits( &descr );
X11DRV_DIB_Unlock( physBitmap, TRUE );
......@@ -4292,13 +4292,13 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep )
if (!found) return EXCEPTION_CONTINUE_SEARCH;
X11DRV_DIB_Lock( physBitmap, DIB_Status_None, FALSE );
X11DRV_DIB_Lock( physBitmap, DIB_Status_None );
if (ep->ExceptionRecord->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT) {
/* the app tried to write the DIB bits */
X11DRV_DIB_Coerce( physBitmap, DIB_Status_AppMod, FALSE );
X11DRV_DIB_Coerce( physBitmap, DIB_Status_AppMod);
} else {
/* the app tried to read the DIB bits */
X11DRV_DIB_Coerce( physBitmap, DIB_Status_InSync, FALSE );
X11DRV_DIB_Coerce( physBitmap, DIB_Status_InSync);
}
X11DRV_DIB_Unlock( physBitmap, TRUE );
......@@ -4308,7 +4308,7 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep )
/***********************************************************************
* X11DRV_DIB_Coerce
*/
static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req)
{
INT ret = DIB_Status_None;
......@@ -4340,11 +4340,9 @@ static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
case DIB_Status_AppMod:
TRACE("GdiMod requested in status AppMod\n" );
if (!lossy) {
/* make it readonly to avoid app changing data while we copy */
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READONLY );
X11DRV_DIB_DoUpdateDIBSection( physBitmap, FALSE );
}
/* make it readonly to avoid app changing data while we copy */
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READONLY );
X11DRV_DIB_DoUpdateDIBSection( physBitmap, FALSE );
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_NOACCESS );
physBitmap->p_status = DIB_Status_AppMod;
physBitmap->status = DIB_Status_GdiMod;
......@@ -4364,10 +4362,8 @@ static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
case DIB_Status_GdiMod:
TRACE("InSync requested in status GdiMod\n" );
if (!lossy) {
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READWRITE );
X11DRV_DIB_DoUpdateDIBSection( physBitmap, TRUE );
}
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READWRITE );
X11DRV_DIB_DoUpdateDIBSection( physBitmap, TRUE );
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READONLY );
physBitmap->status = DIB_Status_InSync;
break;
......@@ -4398,7 +4394,7 @@ static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
case DIB_Status_GdiMod:
TRACE("AppMod requested in status GdiMod\n" );
X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READWRITE );
if (!lossy) X11DRV_DIB_DoUpdateDIBSection( physBitmap, TRUE );
X11DRV_DIB_DoUpdateDIBSection( physBitmap, TRUE );
physBitmap->status = DIB_Status_AppMod;
break;
......@@ -4425,7 +4421,7 @@ static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
/***********************************************************************
* X11DRV_DIB_Lock
*/
static INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
static INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req)
{
INT ret = DIB_Status_None;
......@@ -4434,7 +4430,7 @@ static INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req, BOOL lossy)
EnterCriticalSection(&physBitmap->lock);
ret = physBitmap->status;
if (req != DIB_Status_None)
X11DRV_DIB_Coerce(physBitmap, req, lossy);
X11DRV_DIB_Coerce(physBitmap, req);
return ret;
}
......@@ -4499,19 +4495,19 @@ static void X11DRV_DIB_Unlock(X_PHYSBITMAP *physBitmap, BOOL commit)
/***********************************************************************
* X11DRV_CoerceDIBSection
*/
INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev, INT req, BOOL lossy)
INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev, INT req)
{
if (!physDev || !physDev->bitmap) return DIB_Status_None;
return X11DRV_DIB_Coerce(physDev->bitmap, req, lossy);
return X11DRV_DIB_Coerce(physDev->bitmap, req);
}
/***********************************************************************
* X11DRV_LockDIBSection
*/
INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev, INT req, BOOL lossy)
INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev, INT req)
{
if (!physDev || !physDev->bitmap) return DIB_Status_None;
return X11DRV_DIB_Lock(physDev->bitmap, req, lossy);
return X11DRV_DIB_Lock(physDev->bitmap, req);
}
/***********************************************************************
......@@ -4656,7 +4652,7 @@ void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, DIBSECTION *dib)
}
if (dib->dshSection)
X11DRV_DIB_Coerce(physBitmap, DIB_Status_InSync, FALSE);
X11DRV_DIB_Coerce(physBitmap, DIB_Status_InSync);
if (physBitmap->image)
{
......@@ -4704,7 +4700,7 @@ UINT X11DRV_SetDIBColorTable( X11DRV_PDEVICE *physDev, UINT start, UINT count, c
* FIXME we need to recalculate the pen, brush, text and bkgnd pixels here,
* at least for a 1 bpp dibsection
*/
X11DRV_DIB_Lock( physBitmap, DIB_Status_AppMod, FALSE );
X11DRV_DIB_Lock( physBitmap, DIB_Status_AppMod );
X11DRV_DIB_GenColorMap( physDev, physBitmap->colorMap, DIB_RGB_COLORS,
dib.dsBm.bmBitsPixel,
TRUE, colors, start, end );
......
......@@ -335,7 +335,7 @@ X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
if (X11DRV_SetupGCForPen( physDev )) {
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
GetCurrentPositionEx( physDev->hdc, &pt[0] );
pt[1].x = x;
......@@ -431,7 +431,7 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
if (idiff_angle <= 0) idiff_angle += 360 * 64;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
/* Fill arc with brush if Chord() or Pie() */
......@@ -591,7 +591,7 @@ X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT botto
physDev->pen.width = width;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
if (X11DRV_SetupGCForBrush( physDev ))
{
......@@ -660,7 +660,7 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
physDev->pen.linejoin = PS_JOIN_MITER;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
if ((rc.right > rc.left + width) && (rc.bottom > rc.top + width))
{
......@@ -747,7 +747,7 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
physDev->pen.endcap = PS_ENDCAP_SQUARE;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
if (X11DRV_SetupGCForBrush( physDev ))
{
......@@ -918,7 +918,7 @@ X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
pixel = X11DRV_PALETTE_ToPhysical( physDev, color );
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
/* inefficient but simple... */
wine_tsx11_lock();
......@@ -952,7 +952,7 @@ X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
LPtoDP( physDev->hdc, &pt, 1 );
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
wine_tsx11_lock();
if (memdc)
......@@ -1002,7 +1002,7 @@ X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
rect[i].y += physDev->dc_rect.top;
}
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
wine_tsx11_lock();
XFillRectangles( gdi_display, physDev->drawable, physDev->gc, rect, data->rdh.nCount );
wine_tsx11_unlock();
......@@ -1036,7 +1036,7 @@ X11DRV_Polyline( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
if (X11DRV_SetupGCForPen ( physDev ))
{
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
wine_tsx11_lock();
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
points, count, CoordModeOrigin );
......@@ -1074,7 +1074,7 @@ X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
points[count] = points[0];
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
if (X11DRV_SetupGCForBrush( physDev ))
{
......@@ -1125,7 +1125,7 @@ X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts,
XPoint *points;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
for (i = 0; i < polygons; i++) if (counts[i] > max) max = counts[i];
if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * (max+1) )))
......@@ -1171,7 +1171,7 @@ X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* coun
XPoint *points;
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
for (i = 0; i < polylines; i++) if (counts[i] > max) max = counts[i];
if (!(points = HeapAlloc( GetProcessHeap(), 0, sizeof(XPoint) * max )))
......@@ -1310,7 +1310,7 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
unsigned long pixel = X11DRV_PALETTE_ToPhysical( physDev, color );
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod);
/* ROP mode is always GXcopy for flood-fill */
wine_tsx11_lock();
......
......@@ -432,7 +432,7 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
case X11DRV_SYNC_PIXMAP:
if(physDev->bitmap)
{
X11DRV_CoerceDIBSection(physDev, DIB_Status_GdiMod, FALSE);
X11DRV_CoerceDIBSection(physDev, DIB_Status_GdiMod);
return TRUE;
}
return FALSE;
......
......@@ -75,7 +75,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
if (flags & ETO_OPAQUE)
{
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
dibUpdateFlag = TRUE;
wine_tsx11_lock();
XSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
......@@ -105,7 +105,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
if (!dibUpdateFlag)
{
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
dibUpdateFlag = TRUE;
}
......
......@@ -421,8 +421,8 @@ typedef struct {
extern const dib_conversions dib_normal, dib_src_byteswap, dib_dst_byteswap;
extern INT X11DRV_DIB_MaskToShift(DWORD mask);
extern INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev,INT,BOOL);
extern INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev,INT,BOOL);
extern INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev,INT);
extern INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev,INT);
extern void X11DRV_UnlockDIBSection(X11DRV_PDEVICE *physDev,BOOL);
extern void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, DIBSECTION *dib);
......
......@@ -1162,7 +1162,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
XChangeGC( gdi_display, physDev->gc, GCFunction | GCBackground | GCFillStyle, &xgcval );
wine_tsx11_unlock();
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod );
if(physDev->depth == 1) {
if((physDev->textPixel & 0xffffff) == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment