comparison src/redraw_man.c @ 534:9f2d07a60493 Android_Skia

Document on clean_rdman_dirties()
author Thinker K.F. Li <thinker@branda.to>
date Sun, 27 Dec 2009 14:06:20 +0800
parents 5711059b9642
children a545f126d2bf
comparison
equal deleted inserted replaced
533:b51ae415f459 534:9f2d07a60493
1416 compute_aggr_of_cached_coord(coord); 1416 compute_aggr_of_cached_coord(coord);
1417 else 1417 else
1418 compute_aggr_of_coord(coord); 1418 compute_aggr_of_coord(coord);
1419 1419
1420 /* Areas of cached coords are computed in two phase. 1420 /* Areas of cached coords are computed in two phase.
1421 * Phase 1 works like other normal ones. Phase 2, is collect 1421 * Phase 1 works like other normal ones. Phase 2, collects
1422 * all areas of descendants to compute a minimum covering area. 1422 * all areas of descendants to compute a minimum covering area.
1423 * Phase 2 is performed by zeroing_coord(). 1423 * Phase 2 is performed by zeroing_coord().
1424 */ 1424 */
1425 r = coord_clean_members_n_compute_area(coord); 1425 r = coord_clean_members_n_compute_area(coord);
1426 if(r != OK) 1426 if(r != OK)
1858 } 1858 }
1859 1859
1860 return OK; 1860 return OK;
1861 } 1861 }
1862 1862
1863 /* \brief Clean dirty coords and shapes.
1864 *
1865 * The procedure of clean dirty coords and shapes include 3 major steps.
1866 *
1867 * - Add dirty coords and shapes to rdman.
1868 * - All descendants of a dirty coord are also dirty, except
1869 * descent coords and their descendants.
1870 * - Recompute aggregated transformation matrix from root to leaves
1871 * for dirty coords.
1872 * - The aggregated transformation matrix for a cached coord is
1873 * different from other coords.
1874 * - Compute new area for every dirty coord.
1875 * - Area of a dirty coord is an aggregation of areas of all members.
1876 * - A cached coord has two type of areas, one is for members of the cached
1877 * coord, another one is for the block that cached coord and descendants
1878 * will be mapped in parent cached coord.
1879 * - Areas, for parent cached coord, of non-dirty cached coord
1880 * would be recomputed when cleaning parent coord.
1881 * - Areas, for members, of dirty cached coord would only be
1882 * recomputed when cleaning the coord.
1883 * - Propagate dirty areas to dirty area list of parent cached coord
1884 * for every cached coords, not only for dirty cached coords.
1885 *
1886 * The cur_area of a cached coord is where members of the coord will
1887 * be draw in cache buffer, i.e. surface. The area of the cached
1888 * coord and descendants is described by cached_cur_area and
1889 * cached_last_area in coord_canvas_info_t.
1890 */
1863 static int clean_rdman_dirties(redraw_man_t *rdman) { 1891 static int clean_rdman_dirties(redraw_man_t *rdman) {
1864 int r; 1892 int r;
1865 int i; 1893 int i;
1866 coord_t **coords, *coord; 1894 coord_t **coords, *coord;
1867 geo_t **geos; 1895 geo_t **geos;