[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Backend redesign done / AGG near completion
From: |
Udo Giacomozzi |
Subject: |
[Gnash-dev] Backend redesign done / AGG near completion |
Date: |
Thu, 5 Oct 2006 16:15:33 +0200 |
Hi,
I thought I need more time, but now the backend redesign is nearly
done. It is backwards compatible to older backend designs (only need
to change the ancestor class). I checked it with the OpenGL backend
and SDL gui. It is actually slower than the AGG backend on my machine
(probably because of it's graphics card). However, it works like it
did before.
The AGG backend fits well in the new renderer design and in principle
is ready to test. There are still much things left to do (bitmap and
gradient fills, masks, caching) but at least it can render simple
movies nicely. The GUI currently only supports /dev/fb0 with 15, 16 or
24 bits color depth (no mouse support, yet), but it should be easy to
write GUIs for Windows or X11 (everything that can show bitmaps is
fine).
Do you think we can integrate it in the upcoming release? This would
be great because so I can follow the CVS changes and contribute to it
as well.
The problem is, that I made lots of changes to the source code files
and Makefiles. Here is a overview of the most important things:
- there's a new tesselating_render_handler that can be used by the
OpenGL and Cairo backends so that they don't have to be rewritten.
It calculates mesh sets and caches them with the same principle it
did before.
- I removed all stuff about mesh_sets from the character definitions,
the display() method just passes the call to the render_handler (via
gnash::render)
- The mesh set cache has been removed from the character definitions
(well, it's still there indirectly when using the
tesselating_render_handler)
- Each character_definition has a new member m_render_cache which is
allocated and controlled by the renderer itself. It can be used by
the renderer to hold any kind of caching information
(tesselating_render_handler uses it to store the mesh_set cache).
- The fontlib has been modified slightly so that it asks the renderer
if it wishes textured glyphs at all. Since I noticed there is a
simple anti-aliased renderer in there I kept it. The tesselating
render handler still uses textured (=bitmap) glyphs. AGG however
renders them directly.
- draw_mesh_strip was used in some places to draw the text box
outline, for example. This method is no longer part of the base
render handler (since it forces the use of meshes and has been moved
to the tess.rend.handl.). Instead, I introduced a new draw_poly()
method that can be used for the same task and is much easier to use.
Again, the tesselating render handler internally translates the call
to a mesh strip so that it is compatible with older renderers.
draw_poly() can draw fills, outlines, or both.
- draw_line_strip() was left there since it can be implemented with
any renderer.
- New methods draw_shape_character() and draw_glyph() have been
introduced in the render handler. Their function should be obvious.
- create_bitmap_info_* still exist in the base class since bitmaps are
required for fills (including bitmap graphics) and these should be
set up at parse time.
- Some Makefile.am files have been changed to add AGG to the include
path and to build render_handler_tri.cpp. Someone will have to write
auto-detection for the AGG lib.
At the moment the source code files are carved by comment blocks and
"#if 0"s which should be definitely removed. I can still find any line
that I changed because I always added a comment ("added by Udo" and
such).
So, how can we commit all my changes into CVS?
Udo
- [Gnash-dev] Backend redesign done / AGG near completion,
Udo Giacomozzi <=
Re[2]: [Gnash-dev] Backend redesign done / AGG near completion, Udo Giacomozzi, 2006/10/05