gdi32: Don't create the outline region twice.

This commit is contained in:
Huw Davies 2012-01-09 14:20:22 +00:00 committed by Alexandre Julliard
parent 97b9fc9e39
commit 7994f2c03b
1 changed files with 2 additions and 4 deletions

View File

@ -271,11 +271,10 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
!(interior = CreatePolygonRgn( points, count, WINDING )))
{
HeapFree( GetProcessHeap(), 0, points );
if (outline) DeleteObject( outline );
return FALSE;
}
if (pdev->pen_uses_region) outline = CreateRectRgn( 0, 0, 0, 0 );
/* if not using a region, paint the interior first so the outline can overlap it */
if (interior && !outline)
{
@ -1036,11 +1035,10 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
ellipse_width, ellipse_height )))
{
HeapFree( GetProcessHeap(), 0, points );
if (outline) DeleteObject( outline );
return FALSE;
}
if (pdev->pen_uses_region) outline = CreateRectRgn( 0, 0, 0, 0 );
/* if not using a region, paint the interior first so the outline can overlap it */
if (interior && !outline)
{