From c690899b2779bb4fcad1e7c49738514bbf5d0d85 Mon Sep 17 00:00:00 2001 From: barbieri Date: Wed, 10 Sep 2008 00:47:33 +0000 Subject: [PATCH] Fix usage of DirectFB FillSpans(). git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@35909 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/directfb/polygon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/engines/directfb/polygon.c b/src/modules/engines/directfb/polygon.c index 39797a3..b2d9066 100644 --- a/src/modules/engines/directfb/polygon.c +++ b/src/modules/engines/directfb/polygon.c @@ -1,8 +1,8 @@ #include #include "evas_engine.h" -/* Work around bug in DirectFB FillSpans(), but uses twice as much memory */ -#define USE_SPAN_RECTS 1 +/* reduce calls to DirectFB (FillSpans), but uses twice as much memory */ +//#define USE_SPAN_RECTS 1 #define MAX_SPANS 512 typedef struct _RGBA_Edge RGBA_Edge; @@ -91,7 +91,9 @@ polygon_span_add(span_t *span, int y, int x, int w) static void polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_spans) { - surface->FillSpans(surface, y, spans, n_spans); + /* directfb automatically increments y for each span */ + for (; n_spans > 0; n_spans--, spans++) + surface->FillSpans(surface, y, spans, 1); } #else /* USE_SPAN_RECTS */ typedef DFBRectangle span_t; -- 2.7.4