[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] invalidated bounds redesign - advice needed
From: |
Udo Giacomozzi |
Subject: |
[Gnash-dev] invalidated bounds redesign - advice needed |
Date: |
Tue, 13 Feb 2007 15:10:07 +0100 |
I need some advice from you c++ gurus :-)
The current invalidated bounds detection design has the problem that
it computes only one bounding rectangle. This can be *very*
inefficient in some cases:
- tiny animations in opposite corners will lead into a full redraw
of the whole stage
- invisible (*not* _visible=false) or out-of-stage MCs (often used
as helper MCs) might stretch the bounding rectangle into some
corner.
My tests showed that this happens quite often in movies.
The solution would be to have *multiple* invalidated bounds. During
the get_invalidated_bounds() calls a special object should be passed
that accepts new bounds. Currently these bounds expand the resulting
invalidated bounds rect.
The new design should allow multiple rects in one class and
automatically combine them when it's appropriate. That is, when rects
intersect each other or come close by very few pixels.
What is the most efficient / elegant design for such a class? Remember
that the class will be very busy comparing and combining rects.
After all get_invalidated_bounds() calls the class should contain a
list of rects which are passed to the render handler.
I opt to let it up to the renderer how it handles these multiple
invalidated bounds. By default render_handler_tri (all but AGG) would
simply restart the rendering process for each clipping rectangle.
Opinions? Suggestions?
Udo
- [Gnash-dev] invalidated bounds redesign - advice needed,
Udo Giacomozzi <=