Commit 0c4f81ee authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Don't hold the GDI lock while calling the driver path functions.

parent a5a0d3c2
...@@ -129,7 +129,7 @@ static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) ...@@ -129,7 +129,7 @@ static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
BOOL WINAPI BeginPath(HDC hdc) BOOL WINAPI BeginPath(HDC hdc)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -148,7 +148,7 @@ BOOL WINAPI BeginPath(HDC hdc) ...@@ -148,7 +148,7 @@ BOOL WINAPI BeginPath(HDC hdc)
dc->path.state=PATH_Open; dc->path.state=PATH_Open;
} }
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -159,7 +159,7 @@ BOOL WINAPI BeginPath(HDC hdc) ...@@ -159,7 +159,7 @@ BOOL WINAPI BeginPath(HDC hdc)
BOOL WINAPI EndPath(HDC hdc) BOOL WINAPI EndPath(HDC hdc)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -176,7 +176,7 @@ BOOL WINAPI EndPath(HDC hdc) ...@@ -176,7 +176,7 @@ BOOL WINAPI EndPath(HDC hdc)
/* Set flag to indicate that path is finished */ /* Set flag to indicate that path is finished */
else dc->path.state=PATH_Closed; else dc->path.state=PATH_Closed;
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -198,7 +198,7 @@ BOOL WINAPI EndPath(HDC hdc) ...@@ -198,7 +198,7 @@ BOOL WINAPI EndPath(HDC hdc)
BOOL WINAPI AbortPath( HDC hdc ) BOOL WINAPI AbortPath( HDC hdc )
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -206,7 +206,7 @@ BOOL WINAPI AbortPath( HDC hdc ) ...@@ -206,7 +206,7 @@ BOOL WINAPI AbortPath( HDC hdc )
ret = dc->funcs->pAbortPath(dc->physDev); ret = dc->funcs->pAbortPath(dc->physDev);
else /* Remove all entries from the path */ else /* Remove all entries from the path */
PATH_EmptyPath( &dc->path ); PATH_EmptyPath( &dc->path );
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -219,7 +219,7 @@ BOOL WINAPI AbortPath( HDC hdc ) ...@@ -219,7 +219,7 @@ BOOL WINAPI AbortPath( HDC hdc )
BOOL WINAPI CloseFigure(HDC hdc) BOOL WINAPI CloseFigure(HDC hdc)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -245,7 +245,7 @@ BOOL WINAPI CloseFigure(HDC hdc) ...@@ -245,7 +245,7 @@ BOOL WINAPI CloseFigure(HDC hdc)
} }
} }
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -258,7 +258,7 @@ INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes, ...@@ -258,7 +258,7 @@ INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes,
{ {
INT ret = -1; INT ret = -1;
GdiPath *pPath; GdiPath *pPath;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return -1; if(!dc) return -1;
...@@ -293,7 +293,7 @@ INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes, ...@@ -293,7 +293,7 @@ INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes,
else ret = pPath->numEntriesUsed; else ret = pPath->numEntriesUsed;
} }
done: done:
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -311,7 +311,7 @@ HRGN WINAPI PathToRegion(HDC hdc) ...@@ -311,7 +311,7 @@ HRGN WINAPI PathToRegion(HDC hdc)
{ {
GdiPath *pPath; GdiPath *pPath;
HRGN hrgnRval = 0; HRGN hrgnRval = 0;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
/* Get pointer to path */ /* Get pointer to path */
if(!dc) return 0; if(!dc) return 0;
...@@ -328,7 +328,7 @@ HRGN WINAPI PathToRegion(HDC hdc) ...@@ -328,7 +328,7 @@ HRGN WINAPI PathToRegion(HDC hdc)
else else
hrgnRval=0; hrgnRval=0;
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return hrgnRval; return hrgnRval;
} }
...@@ -414,7 +414,7 @@ static BOOL PATH_FillPath(DC *dc, GdiPath *pPath) ...@@ -414,7 +414,7 @@ static BOOL PATH_FillPath(DC *dc, GdiPath *pPath)
*/ */
BOOL WINAPI FillPath(HDC hdc) BOOL WINAPI FillPath(HDC hdc)
{ {
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
BOOL bRet = FALSE; BOOL bRet = FALSE;
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -431,7 +431,7 @@ BOOL WINAPI FillPath(HDC hdc) ...@@ -431,7 +431,7 @@ BOOL WINAPI FillPath(HDC hdc)
PATH_EmptyPath(&dc->path); PATH_EmptyPath(&dc->path);
} }
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return bRet; return bRet;
} }
...@@ -446,7 +446,7 @@ BOOL WINAPI SelectClipPath(HDC hdc, INT iMode) ...@@ -446,7 +446,7 @@ BOOL WINAPI SelectClipPath(HDC hdc, INT iMode)
GdiPath *pPath; GdiPath *pPath;
HRGN hrgnPath; HRGN hrgnPath;
BOOL success = FALSE; BOOL success = FALSE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -471,7 +471,7 @@ BOOL WINAPI SelectClipPath(HDC hdc, INT iMode) ...@@ -471,7 +471,7 @@ BOOL WINAPI SelectClipPath(HDC hdc, INT iMode)
/* FIXME: Should this function delete the path even if it failed? */ /* FIXME: Should this function delete the path even if it failed? */
} }
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return success; return success;
} }
...@@ -1698,7 +1698,7 @@ static void PATH_NormalizePoint(FLOAT_POINT corners[], ...@@ -1698,7 +1698,7 @@ static void PATH_NormalizePoint(FLOAT_POINT corners[],
BOOL WINAPI FlattenPath(HDC hdc) BOOL WINAPI FlattenPath(HDC hdc)
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -1709,7 +1709,7 @@ BOOL WINAPI FlattenPath(HDC hdc) ...@@ -1709,7 +1709,7 @@ BOOL WINAPI FlattenPath(HDC hdc)
if(pPath->state != PATH_Closed) if(pPath->state != PATH_Closed)
ret = PATH_FlattenPath(pPath); ret = PATH_FlattenPath(pPath);
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
...@@ -2191,7 +2191,7 @@ static BOOL PATH_WidenPath(DC *dc) ...@@ -2191,7 +2191,7 @@ static BOOL PATH_WidenPath(DC *dc)
*/ */
BOOL WINAPI StrokeAndFillPath(HDC hdc) BOOL WINAPI StrokeAndFillPath(HDC hdc)
{ {
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
BOOL bRet = FALSE; BOOL bRet = FALSE;
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -2204,7 +2204,7 @@ BOOL WINAPI StrokeAndFillPath(HDC hdc) ...@@ -2204,7 +2204,7 @@ BOOL WINAPI StrokeAndFillPath(HDC hdc)
if(bRet) bRet = PATH_StrokePath(dc, &dc->path); if(bRet) bRet = PATH_StrokePath(dc, &dc->path);
if(bRet) PATH_EmptyPath(&dc->path); if(bRet) PATH_EmptyPath(&dc->path);
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return bRet; return bRet;
} }
...@@ -2216,7 +2216,7 @@ BOOL WINAPI StrokeAndFillPath(HDC hdc) ...@@ -2216,7 +2216,7 @@ BOOL WINAPI StrokeAndFillPath(HDC hdc)
*/ */
BOOL WINAPI StrokePath(HDC hdc) BOOL WINAPI StrokePath(HDC hdc)
{ {
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
GdiPath *pPath; GdiPath *pPath;
BOOL bRet = FALSE; BOOL bRet = FALSE;
...@@ -2231,7 +2231,7 @@ BOOL WINAPI StrokePath(HDC hdc) ...@@ -2231,7 +2231,7 @@ BOOL WINAPI StrokePath(HDC hdc)
bRet = PATH_StrokePath(dc, pPath); bRet = PATH_StrokePath(dc, pPath);
PATH_EmptyPath(pPath); PATH_EmptyPath(pPath);
} }
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return bRet; return bRet;
} }
...@@ -2243,7 +2243,7 @@ BOOL WINAPI StrokePath(HDC hdc) ...@@ -2243,7 +2243,7 @@ BOOL WINAPI StrokePath(HDC hdc)
*/ */
BOOL WINAPI WidenPath(HDC hdc) BOOL WINAPI WidenPath(HDC hdc)
{ {
DC *dc = DC_GetDCPtr( hdc ); DC *dc = get_dc_ptr( hdc );
BOOL ret = FALSE; BOOL ret = FALSE;
if(!dc) return FALSE; if(!dc) return FALSE;
...@@ -2252,6 +2252,6 @@ BOOL WINAPI WidenPath(HDC hdc) ...@@ -2252,6 +2252,6 @@ BOOL WINAPI WidenPath(HDC hdc)
ret = dc->funcs->pWidenPath(dc->physDev); ret = dc->funcs->pWidenPath(dc->physDev);
else else
ret = PATH_WidenPath(dc); ret = PATH_WidenPath(dc);
DC_ReleaseDCPtr( dc ); release_dc_ptr( dc );
return ret; return ret;
} }
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