comparison src/redraw_man.c @ 525:f9326e955417 Android_Skia

Does not add root coord to zeroing list
author Thinker K.F. Li <thinker@branda.to>
date Tue, 22 Dec 2009 21:58:41 +0800
parents dcf4673896f4
children 3f695a6177b2
comparison
equal deleted inserted replaced
524:dcf4673896f4 525:f9326e955417
1636 dirty_geos = rdman->dirty_geos.ds; 1636 dirty_geos = rdman->dirty_geos.ds;
1637 for(i = 0; i < n_dirty_geos; i++) { 1637 for(i = 0; i < n_dirty_geos; i++) {
1638 geo = dirty_geos[i]; 1638 geo = dirty_geos[i];
1639 coord = geo_get_coord(geo)->canvas_info->owner; 1639 coord = geo_get_coord(geo)->canvas_info->owner;
1640 while(!coord_get_flags(coord, COF_MUST_ZEROING | COF_TEMP_MARK)) { 1640 while(!coord_get_flags(coord, COF_MUST_ZEROING | COF_TEMP_MARK)) {
1641 coord_set_flags(coord, COF_TEMP_MARK);
1642 if(coord_is_root(coord)) 1641 if(coord_is_root(coord))
1643 break; 1642 break;
1643 coord_set_flags(coord, COF_TEMP_MARK);
1644 coord = coord->parent->canvas_info->owner; 1644 coord = coord->parent->canvas_info->owner;
1645 } 1645 }
1646 } 1646 }
1647 1647
1648 /* Mark all cached ancestral coords of dirty coords */ 1648 /* Mark all cached ancestral coords of dirty coords */
1649 n_dirty_coords = rdman->dirty_coords.num; 1649 n_dirty_coords = rdman->dirty_coords.num;
1650 dirty_coords = rdman->dirty_coords.ds; 1650 dirty_coords = rdman->dirty_coords.ds;
1651 for(i = 0; i < n_dirty_coords; i++) { 1651 for(i = 0; i < n_dirty_coords; i++) {
1652 coord = dirty_coords[i]->canvas_info->owner; 1652 coord = dirty_coords[i]->canvas_info->owner;
1653 while(!coord_get_flags(coord, COF_MUST_ZEROING | COF_TEMP_MARK)) { 1653 while(!coord_get_flags(coord, COF_MUST_ZEROING | COF_TEMP_MARK)) {
1654 coord_set_flags(coord, COF_TEMP_MARK);
1655 if(coord_is_root(coord)) 1654 if(coord_is_root(coord))
1656 break; 1655 break;
1656 coord_set_flags(coord, COF_TEMP_MARK);
1657 coord = coord->parent->canvas_info->owner; 1657 coord = coord->parent->canvas_info->owner;
1658 } 1658 }
1659 } 1659 }
1660 1660
1661 /* Add all marked coords into redraw_man_t::zeroing_coords list */ 1661 /* Add all marked coords into redraw_man_t::zeroing_coords list */
1685 coord_t *coord; 1685 coord_t *coord;
1686 1686
1687 all_zeroing = &rdman->zeroing_coords; 1687 all_zeroing = &rdman->zeroing_coords;
1688 for(i = all_zeroing->num - 1; i >= 0; i--) { 1688 for(i = all_zeroing->num - 1; i >= 0; i--) {
1689 coord = all_zeroing->ds[i]; 1689 coord = all_zeroing->ds[i];
1690 if(coord_is_root(coord))
1691 continue;
1692 zeroing_coord(rdman, coord); 1690 zeroing_coord(rdman, coord);
1693 } 1691 }
1694 1692
1695 return OK; 1693 return OK;
1696 } 1694 }