Commit 6d23f3e7 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Keep the source DC locked until the end in StretchBlt and AlphaBlend.

parent 61f4767a
...@@ -256,9 +256,11 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, ...@@ -256,9 +256,11 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE; if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE;
src_dev = GET_DC_PHYSDEV( dc_src, pGetImage ); src_dev = GET_DC_PHYSDEV( dc_src, pGetImage );
err = src_dev->funcs->pGetImage( src_dev, src_info, &bits, src ); if (src_dev->funcs->pGetImage( src_dev, src_info, &bits, src ))
{
release_dc_ptr( dc_src ); release_dc_ptr( dc_src );
if (err) return FALSE; return FALSE;
}
dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage ); dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage );
copy_bitmapinfo( dst_info, src_info ); copy_bitmapinfo( dst_info, src_info );
...@@ -299,6 +301,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, ...@@ -299,6 +301,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
} }
if (bits.free) bits.free( &bits ); if (bits.free) bits.free( &bits );
release_dc_ptr( dc_src );
return !err; return !err;
} }
...@@ -317,7 +320,6 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, ...@@ -317,7 +320,6 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE; if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE;
src_dev = GET_DC_PHYSDEV( dc_src, pGetImage ); src_dev = GET_DC_PHYSDEV( dc_src, pGetImage );
err = src_dev->funcs->pGetImage( src_dev, src_info, &bits, src ); err = src_dev->funcs->pGetImage( src_dev, src_info, &bits, src );
release_dc_ptr( dc_src );
if (err) goto done; if (err) goto done;
dst_dev = GET_DC_PHYSDEV( dc_dst, pBlendImage ); dst_dev = GET_DC_PHYSDEV( dc_dst, pBlendImage );
...@@ -339,6 +341,7 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, ...@@ -339,6 +341,7 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (bits.free) bits.free( &bits ); if (bits.free) bits.free( &bits );
done: done:
release_dc_ptr( dc_src );
if (err) SetLastError( err ); if (err) SetLastError( err );
return !err; return !err;
} }
......
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