Module: wine Branch: master Commit: d858041a1960789701ca09cbc2cc41d3fc85d5a2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d858041a1960789701ca09cbc2...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jan 4 16:53:17 2012 +0100
gdi32: Get rid of the pen deferring support, all pen styles are implemented now.
---
dlls/gdi32/dibdrv/dc.c | 1 - dlls/gdi32/dibdrv/dibdrv.h | 8 -------- dlls/gdi32/dibdrv/graphics.c | 13 ------------- dlls/gdi32/dibdrv/objects.c | 8 -------- 4 files changed, 0 insertions(+), 30 deletions(-)
diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 5b9c844..97771c5 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -363,7 +363,6 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap ) return 0; } pdev->dib = dib; - pdev->defer = 0; GDI_ReleaseObj( bitmap );
return next->funcs->pSelectBitmap( next, bitmap ); diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 03d48af..5d93578 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -96,7 +96,6 @@ typedef struct dibdrv_physdev dib_brush brush;
HRGN clip; - DWORD defer;
/* pen */ DWORD pen_style, pen_endcap, pen_join; @@ -109,8 +108,6 @@ typedef struct dibdrv_physdev BOOL (* pen_lines)(struct dibdrv_physdev *pdev, int num, POINT *pts, BOOL close, HRGN region); } dibdrv_physdev;
-#define DEFER_PEN 2 - extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN; extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_bits *bits, @@ -261,8 +258,3 @@ static inline int edge_coord( int y, int x1, int y1, int x2, int y2 ) else return x1 + (y - y1) * (x2 - x1) / (y2 - y1); } - -static inline BOOL defer_pen(dibdrv_physdev *pdev) -{ - return pdev->defer & DEFER_PEN; -} diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index d14148e..1ba157b 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -441,14 +441,11 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y ) */ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y ) { - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pLineTo ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); POINT pts[2]; HRGN region = 0; BOOL ret;
- if(defer_pen(pdev)) return next->funcs->pLineTo( next, x, y ); - GetCurrentPositionEx(dev->hdc, pts); pts[1].x = x; pts[1].y = y; @@ -525,14 +522,11 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn ) BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD polygons ) { dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyPolygon ); DWORD total, i, pos; BOOL ret = TRUE; POINT *points; HRGN outline = 0, interior = 0;
- if (defer_pen( pdev )) return next->funcs->pPolyPolygon( next, pt, counts, polygons ); - for (i = total = 0; i < polygons; i++) { if (counts[i] < 2) return FALSE; @@ -589,14 +583,11 @@ BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines ) { dibdrv_physdev *pdev = get_dibdrv_pdev(dev); - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyPolyline ); DWORD max_points = 0, i; POINT *points; BOOL ret = TRUE; HRGN outline = 0;
- if (defer_pen( pdev )) return next->funcs->pPolyPolyline( next, pt, counts, polylines ); - for (i = 0; i < polylines; i++) { if (counts[i] < 2) return FALSE; @@ -659,7 +650,6 @@ BOOL dibdrv_Polyline( PHYSDEV dev, const POINT* pt, INT count ) */ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) { - PHYSDEV next = GET_NEXT_PHYSDEV( dev, pRectangle ); dibdrv_physdev *pdev = get_dibdrv_pdev(dev); RECT rect = get_device_rect( dev->hdc, left, top, right, bottom, TRUE ); POINT pts[4]; @@ -670,9 +660,6 @@ 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)) - return next->funcs->pRectangle( next, left, top, right, bottom ); - if (pdev->pen_style == PS_INSIDEFRAME) { rect.left += pdev->pen_width / 2; diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 51a49cc..e18d715 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -2088,8 +2088,6 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte set_dash_pattern( &pdev->pen_pattern, 0, NULL ); select_brush( &pdev->pen_brush, &logbrush, pattern );
- pdev->defer |= DEFER_PEN; - pdev->pen_style = logpen.lopnStyle & PS_STYLE_MASK;
switch (pdev->pen_style) @@ -2107,40 +2105,34 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte pdev->pen_lines = dashed_wide_pen_lines; } else pdev->pen_lines = dashed_pen_lines; - pdev->defer &= ~DEFER_PEN; break; } if (pdev->pen_width == 1) /* wide cosmetic pens are not dashed */ { pdev->pen_lines = dashed_pen_lines; pdev->pen_pattern = dash_patterns_cosmetic[pdev->pen_style - 1]; - pdev->defer &= ~DEFER_PEN; break; } /* fall through */ case PS_SOLID: case PS_INSIDEFRAME: pdev->pen_lines = (pdev->pen_width == 1) ? solid_pen_lines : wide_pen_lines; - pdev->defer &= ~DEFER_PEN; break;
case PS_NULL: pdev->pen_width = 0; pdev->pen_lines = null_pen_lines; - pdev->defer &= ~DEFER_PEN; break;
case PS_ALTERNATE: pdev->pen_lines = dashed_pen_lines; pdev->pen_pattern = dash_patterns_geometric[PS_DOT - 1]; - pdev->defer &= ~DEFER_PEN; break;
case PS_USERSTYLE: pdev->pen_lines = (pdev->pen_width == 1) ? dashed_pen_lines : dashed_wide_pen_lines; set_dash_pattern( &pdev->pen_pattern, elp->elpNumEntries, elp->elpStyleEntry ); if (!(logpen.lopnStyle & PS_GEOMETRIC)) scale_dash_pattern( &pdev->pen_pattern, 3, PS_ENDCAP_FLAT ); - pdev->defer &= ~DEFER_PEN; break; }