|Site sponsored by IGEL|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[directfb-users] 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,®ion,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,®ion,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 email@example.com with "unsubscribe directfb-users" as subject.