gnash-dev
[Top][All Lists]
Advanced

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

Re[4]: [Gnash-dev] opengl->agg?


From: Udo Giacomozzi
Subject: Re[4]: [Gnash-dev] opengl->agg?
Date: Tue, 8 May 2007 19:25:18 +0200

Hello Martin,

Tuesday, May 8, 2007, 6:56:28 PM, you wrote:
MG> A good distinction; I assume most of that is just running at control
MG> rate though.

Yes, only complex graphics (lots of edges) will slow things down.

MG> Ultimately just filling in screen area is the killer I
MG> should think, or at least hope :)

Filling with a solid color should not be the killer. AGG basically
works like this:

As most graphics libs, it works using scanlines (threats each Y
coordinate separately and renders that line in one pass).

It looks for all X coordinates crossing that scanline and loads a
"span". That are the pixels between one X coordinate and the other.
For a solid color it knows that it can de some memset stuff (or
similar).

For all other fills (gradient, bitmap) there are special "span
allocators" that return the pixels required to render this part of the
scanline. Anti-aliasing is applied afterwards.

Of course it is a bit more complicate, but generally it works this
way.

Thanks to the template design everything is extremely specialized (ie.
different code to fill a solid code depending on pixel format) so I'm
sure AGG is the fastest software rendering engine you can have.



MG> There are other ways, like the changed-region stuff

That would make a huge improvement for sure. Nearly all of the frames
in Neuro.swf by Bruno Bozzeto are completely re-rendered even if 98%
of the scene didn't change.


MG> or implementing bulk operations with liboil...
MG> and implementing the optimised liboil
MG> asm code for the routines we use, on all our target CPU
MG> architectures...

That might be interesting for matrix conversions. But again, no huge
improvement to expect.


>> the Cairo code is based on the
>> render_handler_tri, which leaves polygon transformations (solving to
>> triangles) to Gnash. AGG does this on-the-fly and is probably much
>> more accurate and faster.
MG> Yes, there are cairo-specific bugs due to that. Triangulation of a
MG> surface results in scribble.

AGG has a special rasterizer built for Flash files, fortunately :-)


Udo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]