DirectFB - Home of the pragmatist Roadmap


[directfb-users] Performance problem with Flip
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-users] Performance problem with Flip


  • To: <directfb-users@directfb.org>
  • Subject: [directfb-users] Performance problem with Flip
  • From: "Manhart Matthias" <m.manhart@jmag.ch>
  • Date: Mon, 10 Nov 2003 07:36:42 +0100
  • Content-class: urn:content-classes:message
  • Content-transfer-encoding: quoted-printable
  • Content-type: text/plain;charset="us-ascii"
  • Sender: directfb-users-bounce@directfb.org
  • Thread-index: AcOnVQC5BWsDW5tDQ8OuhPQ6YAn+FA==
  • Thread-topic: Performance problem with Flip

I use DirectFB 0.9.19 on an industrial PC with VESA-mode 788 (800x600).
I implemented in our application a simple drawing-application. The user
sets the starting point of a line with a first mouse-click. Now the
application "follows" the mouse with a line, starting at this first
point. This is done like this (pseudo-code):

/* Clear old mouse-line */
SetDrawingFlags(surface,DSDRAW_XOR);
DrawLine(surface,start.x,start.y,old.x,old.y);
region.x1 = start.x;
region.y1 = start.y;
region.x2 = old.x;
region.y2 = old.y;
Flip(surface,&region,0);

/* Draw new mouse-line */
DrawLine(surface,start.x,start.y,mouse.x,mouse.y);
region.x1 = start.x;
region.y1 = start.y;
region.x2 = mouse.x;
region.y2 = mouse.y;
Flip(surface,&region,0);
SetDrawingFlags(surface,DSDRAW_NOFX);

When the mouse-line is short, the performance is ok. There is no serious
delay between the mouse and the line.

When the mouse-line gets longer and the flipping region gets bigger, the
performance breaks in. This means, that the mouse-line is delayed and
"follows" the mouse.

How can i speedup the performance for this ?
Is there a way to draw directly to the screen without "flip" ?

Thanks for your help

Matthias
Switzerland


--
Info: To unsubscribe send a mail to ecartis@directfb.org with
"unsubscribe directfb-users" as subject.



Home | Main Index | Thread Index


directfb.org / Development / Old Archives