From a585659e31c3cb078623f0afc131f0d5305cf1b8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 19 Dec 2011 11:35:14 +0100 Subject: [PATCH] gdi32: Remove support for deferring brush calls to X11, all brush types are supported now. --- dlls/gdi32/dibdrv/dibdrv.h | 6 ------ dlls/gdi32/dibdrv/graphics.c | 21 ++++----------------- dlls/gdi32/dibdrv/objects.c | 6 ------ 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 6c63c3d929..1bf9114517 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -112,7 +112,6 @@ typedef struct dibdrv_physdev } dibdrv_physdev; #define DEFER_PEN 2 -#define DEFER_BRUSH 4 extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, 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; } - -static inline BOOL defer_brush(dibdrv_physdev *pdev) -{ - return pdev->defer & DEFER_BRUSH; -} diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index 67f1c99731..69ce50b2d2 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -467,26 +467,16 @@ static inline INT get_rop2_from_rop(INT 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); 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); - if(defer_brush(pdev)) - return next->funcs->pPatBlt( next, dst, rop ); - update_brush_rop( pdev, rop2 ); - - done = brush_rects( pdev, 1, &dst->visrect ); - + ret = brush_rects( pdev, 1, &dst->visrect ); update_brush_rop( pdev, GetROP2(dev->hdc) ); - - if(!done) - return next->funcs->pPatBlt( next, dst, rop ); - - return TRUE; + return ret; } /*********************************************************************** @@ -494,7 +484,6 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) */ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn ) { - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPaintRgn ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); const WINEREGION *region; int i; @@ -502,8 +491,6 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn ) TRACE("%p, %p\n", dev, rgn); - if(defer_brush(pdev)) return next->funcs->pPaintRgn( next, rgn ); - region = get_wine_region( rgn ); 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(defer_pen(pdev) || defer_brush(pdev)) + if(defer_pen(pdev)) return next->funcs->pRectangle( next, left, top, right, bottom ); reset_dash_origin(pdev); diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 1b6fc898a6..d9fb868db1 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1657,7 +1657,6 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap, pdev->brush_pattern_bits = bits; pdev->brush_pattern_usage = usage; pdev->brush_pattern_bitmap = bitmap; - pdev->defer &= ~DEFER_BRUSH; free_pattern_brush( pdev ); /* brush is actually selected only when it's used */ 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->defer |= DEFER_BRUSH; - free_pattern_brush( pdev ); 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 ); calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); pdev->brush_rects = solid_brush; - pdev->defer &= ~DEFER_BRUSH; break; case BS_NULL: pdev->brush_rects = null_brush; - pdev->defer &= ~DEFER_BRUSH; break; 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 ); calc_and_xor_masks(GetROP2(dev->hdc), pdev->brush_color, &pdev->brush_and, &pdev->brush_xor); pdev->brush_rects = pattern_brush; - pdev->defer &= ~DEFER_BRUSH; break; default: -- 2.32.0.93.g670b81a890