Mercurial > MadButterfly
diff src/redraw_man.h @ 158:c1cdd3fcd28f
Postponing rdman_coord_free() and rdman_remove_shape().
rdman will access free memory if coords or shapes are free when it
is dirty. The requests are postponed until rdman is clean.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 03 Oct 2008 10:22:08 +0800 |
parents | 6ce68c1f7405 |
children | b90abd31a281 |
line wrap: on
line diff
--- a/src/redraw_man.h Wed Oct 01 16:30:05 2008 +0800 +++ b/src/redraw_man.h Fri Oct 03 10:22:08 2008 +0800 @@ -6,6 +6,10 @@ #include "mb_types.h" #include "observer.h" +DARRAY(coords, coord_t *); +DARRAY(geos, geo_t *); +DARRAY(areas, area_t *); + /*! \brief Manage redrawing of shapes (graphic elements). * * Every coord_t and geo_t object is assigned with a unique @@ -33,23 +37,14 @@ elmpool_t *subject_pool; elmpool_t *paint_color_pool; - int max_dirty_coords; - int n_dirty_coords; - coord_t **dirty_coords; /*!< coordinates their transform - * matric are chagned. - */ + coords_t dirty_coords; + geos_t dirty_geos; + areas_t dirty_areas; - int max_dirty_geos; - int n_dirty_geos; - geo_t **dirty_geos; /*!< geometries that need re-computed */ + geos_t gen_geos; - int max_dirty_areas; - int n_dirty_areas; - area_t **dirty_areas; /*!< \brief are areas need to redraw. */ - - int max_gen_geos; - int n_gen_geos; - geo_t **gen_geos; /* general geo list (for temporary store) */ + coords_t free_coords; + geos_t free_geos; cairo_t *cr; cairo_t *backend;