Quoting Monge Maurizio ([EMAIL PROTECTED]):
> > I added exactly this optimization to another project a few days ago ;)
> >
> > Instead of keeping one rect it keeps a list of rects. Each time a rect is
> > added it iterates through existing rects. The first intersecting rect found
> > is extended by the new one, otherwise the new rect is added to the list.
> >
> > This is quite easy to implement and works very good so far.
> >
> 
> I was thinking that i am not sure that this would save a lot ...
> Any way in qt thin can be done in 2 second, since the area is grown
> with something like
> 
> pending_update |= QRect(x,y,w,h);
> 
> If pending_update was a QRegion instead of a QRect the semantic is
> exactly the same :-)

We should try using one QRegion which gets added the bounding rect of
each operation. At the end each rectangle of the region is flipped.

> Another optimization in Qt is that when a window has to be redrawn,
> child widgets are redrawn but flips are locked, and then the whole
> window is flipped. This should not only be slightly faster, but it is
> sometime much more good looking...

This is also done in GTK+ and AWT on DirectFB.

They use one update region for one complete paint event handling.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to