diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-28 12:53:01 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-28 14:52:51 (GMT) |
commit | 464d895c9997d35c223899165586f1d3a276f054 (patch) | |
tree | d8050f206dfb934ef4be5713dcf519b212f210e5 /src | |
parent | d72ba30f29cc641cd3d3ee624bd39e6247bec553 (diff) | |
download | Qt-464d895c9997d35c223899165586f1d3a276f054.zip Qt-464d895c9997d35c223899165586f1d3a276f054.tar.gz Qt-464d895c9997d35c223899165586f1d3a276f054.tar.bz2 |
Small optimizations the gray raster for 64-bit.
The gray raster uses long to ensure having 32-bit integers since it was
originally designed to work on 16-bit platforms as well. On 64-bit
platforms switching to use int instead of long gives a performance boost
of ~10 % or so depending on the use case.
Reviewed-by: Yoann Lopes
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index 94039fb..f348f7f 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -233,7 +233,7 @@ /* new algorithms */ typedef int TCoord; /* integer scanline/pixel coordinate */ - typedef long TPos; /* sub-pixel coordinate */ + typedef int TPos; /* sub-pixel coordinate */ /* determine the type used to store cell areas. This normally takes at */ /* least PIXEL_BITS*2 + 1 bits. On 16-bit systems, we need to use */ @@ -538,7 +538,7 @@ TCoord y2 ) { TCoord ex1, ex2, fx1, fx2, delta; - long p, first, dx; + int p, first, dx; int incr, lift, mod, rem; @@ -643,7 +643,7 @@ { TCoord ey1, ey2, fy1, fy2; TPos dx, dy, x, x2; - long p, first; + int p, first; int delta, rem, mod, lift, incr; @@ -1670,7 +1670,7 @@ { PCell cells_max; int yindex; - long cell_start, cell_end, cell_mod; + int cell_start, cell_end, cell_mod; ras.ycells = (PCell*)ras.buffer; |