[haiku-appserver] Quite some room for improvement
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku-appserver@xxxxxxxxxxxxx
- Date: Mon, 12 Dec 2005 00:46:17 +0100
Hi all,
The good news is that I've found a way to accelerate the alpha blending
inside the drawing modes that Painter uses by a factor of 4.6. For writing
to graphics memory, the access pattern doesn't seem to matter much. There
is virtually no difference if you write 8 bits, 32 bits or 64 bits at once.
But when you need to read from the frame buffer, the difference is quite
noticable: It is 3.6 times faster to read 32 bits into a temporary
variable, alpha blend into that, and write it back. 4.6 times faster to do
them same, but with 64 bits. I always thought that this stuff mattered for
just writing to graphics mem as well, but it seems that this is not the
case.
I've also noticed an awesome possibility for speed improvement in my bitmap
rendring code for clipped bitmaps. This should speed up WonderBrush on
Haiku quite a bit. Maybe this applies to more stuff as well. If I
understand AGG correctly, it will clip stuff you draw at a very late stage,
mostly at the time it tries to write a generated scanline to the frame
buffer. When you manually apply a bit of clipping before that, you can
possibly skip the generation of much of the scanline as well. For bitmaps,
this is especially easy to accomplish. And even more effective, since AGG
would generate a color scanline, since the "fill" is not a solid color.
Best regards,
-Stephan
Other related posts: