gdi32: Remove support for deferring brush calls to X11, all brush types are supported now.

This commit is contained in:
Alexandre Julliard 2011-12-19 11:35:14 +01:00
parent 4066587f19
commit a585659e31
3 changed files with 4 additions and 29 deletions

View File

@ -112,7 +112,6 @@ typedef struct dibdrv_physdev
} dibdrv_physdev; } dibdrv_physdev;
#define DEFER_PEN 2 #define DEFER_PEN 2
#define DEFER_BRUSH 4
extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN; PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN;
@ -253,8 +252,3 @@ static inline BOOL defer_pen(dibdrv_physdev *pdev)
{ {
return pdev->defer & DEFER_PEN; return pdev->defer & DEFER_PEN;
} }
static inline BOOL defer_brush(dibdrv_physdev *pdev)
{
return pdev->defer & DEFER_BRUSH;
}

View File

@ -467,26 +467,16 @@ static inline INT get_rop2_from_rop(INT rop)
*/ */
BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
{ {
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPatBlt );
dibdrv_physdev *pdev = get_dibdrv_pdev(dev); dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
INT rop2 = get_rop2_from_rop(rop); INT rop2 = get_rop2_from_rop(rop);
BOOL done; BOOL ret;
TRACE("(%p, %d, %d, %d, %d, %06x)\n", dev, dst->x, dst->y, dst->width, dst->height, rop); TRACE("(%p, %d, %d, %d, %d, %06x)\n", dev, dst->x, dst->y, dst->width, dst->height, rop);
if(defer_brush(pdev))
return next->funcs->pPatBlt( next, dst, rop );
update_brush_rop( pdev, rop2 ); update_brush_rop( pdev, rop2 );
ret = brush_rects( pdev, 1, &dst->visrect );
done = brush_rects( pdev, 1, &dst->visrect );
update_brush_rop( pdev, GetROP2(dev->hdc) ); update_brush_rop( pdev, GetROP2(dev->hdc) );
return ret;
if(!done)
return next->funcs->pPatBlt( next, dst, rop );
return TRUE;
} }
/*********************************************************************** /***********************************************************************
@ -494,7 +484,6 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
*/ */
BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn ) BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
{ {
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPaintRgn );
dibdrv_physdev *pdev = get_dibdrv_pdev(dev); dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
const WINEREGION *region; const WINEREGION *region;
int i; int i;
@ -502,8 +491,6 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
TRACE("%p, %p\n", dev, rgn); TRACE("%p, %p\n", dev, rgn);
if(defer_brush(pdev)) return next->funcs->pPaintRgn( next, rgn );
region = get_wine_region( rgn ); region = get_wine_region( rgn );
if(!region) return FALSE; if(!region) return FALSE;
@ -587,7 +574,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
if(rect.left == rect.right || rect.top == rect.bottom) return TRUE; if(rect.left == rect.right || rect.top == rect.bottom) return TRUE;
if(defer_pen(pdev) || defer_brush(pdev)) if(defer_pen(pdev))
return next->funcs->pRectangle( next, left, top, right, bottom ); return next->funcs->pRectangle( next, left, top, right, bottom );
reset_dash_origin(pdev); reset_dash_origin(pdev);

View File

@ -1657,7 +1657,6 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap,
pdev->brush_pattern_bits = bits; pdev->brush_pattern_bits = bits;
pdev->brush_pattern_usage = usage; pdev->brush_pattern_usage = usage;
pdev->brush_pattern_bitmap = bitmap; pdev->brush_pattern_bitmap = bitmap;
pdev->defer &= ~DEFER_BRUSH;
free_pattern_brush( pdev ); /* brush is actually selected only when it's used */ free_pattern_brush( pdev ); /* brush is actually selected only when it's used */
return next->funcs->pSelectBrush( next, hbrush, bitmap, info, bits, usage ); return next->funcs->pSelectBrush( next, hbrush, bitmap, info, bits, usage );
@ -1670,8 +1669,6 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap,
pdev->brush_style = logbrush.lbStyle; pdev->brush_style = logbrush.lbStyle;
pdev->defer |= DEFER_BRUSH;
free_pattern_brush( pdev ); free_pattern_brush( pdev );
switch(logbrush.lbStyle) switch(logbrush.lbStyle)
@ -1681,12 +1678,10 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap,
pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor);
pdev->brush_rects = solid_brush; pdev->brush_rects = solid_brush;
pdev->defer &= ~DEFER_BRUSH;
break; break;
case BS_NULL: case BS_NULL:
pdev->brush_rects = null_brush; pdev->brush_rects = null_brush;
pdev->defer &= ~DEFER_BRUSH;
break; break;
case BS_HATCHED: case BS_HATCHED:
@ -1696,7 +1691,6 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap,
pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE ); pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor);
pdev->brush_rects = pattern_brush; pdev->brush_rects = pattern_brush;
pdev->defer &= ~DEFER_BRUSH;
break; break;
default: default: