[haiku-appserver] Re: 2d HW acceleration - what's the status?

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Tue, 31 Jul 2007 21:50:55 +0200

Hi Bryan,

Bryan Varner wrote (2007-07-31, 21:26:12 [+0200]):
> >> Am I correct in assuming that because everything is double buffered,
> > that
> >> the Painter never actually writes directly to the HW frame buffer?
> >
> > No, you are misinformed. Double buffering is only used for colorspaces
> > other
> > than 32 bits. If you can somehow run in 32 bits, then hardware
> > acceleration
> > is used and double buffering is _not_ used.
> 
> Ah, not to sound like an idiot, but what's the reason that we only use it
> for 32bit?

The drawing_mode implementations are just there for 32 bits. They have not 
been implemented for the other modes. If you think about it, it is not even 
too bad how it is done. Food for thought... I would not do anything about 
that right now, we have bigger fish to fry with regards to app_server. For 
example a better font cache locking scheme... :-)

> Has anyone looked into using fill-rect (accelerant) for drawing straight
> lines? Is Painter->StraightLine(...) faster than the imposed overhead of
> handing off the function to the GPU? Has anyone tried to find the 'happy
> medium' where it becomes beneficial?
> 
> Just curious... This has piqued my interest.

Yes, it might be benficial to use the HW function when the length is above a 
threshold. This is already done for FillRect, it is faster to do in CPU for 
small rects.

Best regards,
-Stephan

Other related posts: