diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-18 15:49:01 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-18 15:49:01 (GMT) |
commit | 1d152964adec62d03ce2f4a45ca40ddbd05819ae (patch) | |
tree | 3b0aa94c3fc0a7e1c52e6bb36b587b660d902753 /src/gui/painting/qgrayraster.c | |
parent | fdd3fca40a3fc31762b637952884903816b50786 (diff) | |
parent | 7eb560609cf1fc82f897a9a67c76e42b06823f9b (diff) | |
download | Qt-1d152964adec62d03ce2f4a45ca40ddbd05819ae.zip Qt-1d152964adec62d03ce2f4a45ca40ddbd05819ae.tar.gz Qt-1d152964adec62d03ce2f4a45ca40ddbd05819ae.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Some optimizations for the gray-raster (raster engine antialiasing).
Fix fontconfig pattern merging
Diffstat (limited to 'src/gui/painting/qgrayraster.c')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index ec9ebeb..536f265 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -408,25 +408,31 @@ /* */ /* Record the current cell in the table. */ /* */ - static PCell - gray_find_cell( RAS_ARG ) + static void + gray_record_cell( RAS_ARG ) { PCell *pcell, cell; int x = ras.ex; + if ( ras.invalid || !( ras.area | ras.cover ) ) + return; if ( x > ras.max_ex ) x = ras.max_ex; pcell = &ras.ycells[ras.ey]; + for (;;) { cell = *pcell; if ( cell == NULL || cell->x > x ) break; - if ( cell->x == x ) - goto Exit; + if ( cell->x == x ) { + cell->area += ras.area; + cell->cover += ras.cover; + return; + } pcell = &cell->next; } @@ -436,28 +442,11 @@ cell = ras.cells + ras.num_cells++; cell->x = x; - cell->area = 0; - cell->cover = 0; + cell->area = ras.area; + cell->cover = ras.cover; cell->next = *pcell; *pcell = cell; - - Exit: - return cell; - } - - - static void - gray_record_cell( RAS_ARG ) - { - if ( !ras.invalid && ( ras.area | ras.cover ) ) - { - PCell cell = gray_find_cell( RAS_VAR ); - - - cell->area += ras.area; - cell->cover += ras.cover; - } } |