summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qgrayraster.c
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-09-28 14:53:01 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2010-09-28 16:52:51 +0200
commit464d895c9997d35c223899165586f1d3a276f054 (patch)
treed8050f206dfb934ef4be5713dcf519b212f210e5 /src/gui/painting/qgrayraster.c
parentd72ba30f29cc641cd3d3ee624bd39e6247bec553 (diff)
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/gui/painting/qgrayraster.c')
-rw-r--r--src/gui/painting/qgrayraster.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 94039fb71e..f348f7fa8a 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;