Mercurial > MadButterfly
comparison src/redraw_man.c @ 935:960e2395973d
Fix the bug of crash by abort() when running testsvg.js.
The cached coords their pcache areas should be recomputed are also add
ro zeroing list. They have no dirty areas. But, their pcache area
must be added to parent cached coord.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Fri, 12 Nov 2010 16:03:19 +0800 |
parents | 8a2d676d9fa3 |
children | 36aef79d68e4 |
comparison
equal
deleted
inserted
replaced
934:5dedeedf0408 | 935:960e2395973d |
---|---|
1826 area_t *area0, *area1; | 1826 area_t *area0, *area1; |
1827 coord_t *parent, *pcached_coord; | 1827 coord_t *parent, *pcached_coord; |
1828 | 1828 |
1829 n_areas = _coord_get_dirty_areas(coord)->num; | 1829 n_areas = _coord_get_dirty_areas(coord)->num; |
1830 areas = _coord_get_dirty_areas(coord)->ds; | 1830 areas = _coord_get_dirty_areas(coord)->ds; |
1831 if(n_areas == 0) | 1831 if(n_areas == 0) { |
1832 abort(); /* should not happen! */ | 1832 /* Go here for cached one that is descendant of another zeroed |
1833 * one, but itself is not zeroed. It is here for recomputing | |
1834 * pcache areas. | |
1835 */ | |
1836 if(coord_get_flags(coord, COF_JUST_CLEAN | COF_JUST_ZERO)) | |
1837 abort(); /* should not happen! */ | |
1838 | |
1839 parent = coord_get_parent(coord); | |
1840 pcached_coord = coord_get_cached(parent); | |
1841 area = coord_get_pcache_area(coord); | |
1842 add_dirty_area(rdman, pcached_coord, area); | |
1843 area = coord_get_pcache_last_area(coord); | |
1844 add_dirty_area(rdman, pcached_coord, area); | |
1845 return; | |
1846 } | |
1833 | 1847 |
1834 area0 = _coord_get_aggr_dirty_areas(coord); | 1848 area0 = _coord_get_aggr_dirty_areas(coord); |
1835 area1 = area0 + 1; | 1849 area1 = area0 + 1; |
1836 | 1850 |
1837 /* TODO: Since both cur & last area of coords are added into dirty | 1851 /* TODO: Since both cur & last area of coords are added into dirty |