[Marble-commits] KDE/kdeedu/marble/src/lib
Ariya Hidayat
ariya at kde.org
Thu Jan 21 16:18:50 CET 2010
SVN commit 1078110 by ariya:
Minor speed-up: do not carry out multiplications inside the inner loop.
M +5 -3 AbstractScanlineTextureMapper.cpp
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1078109:1078110
@@ -412,10 +412,12 @@
tileWidth, tileHeight, n );
if ( !alwaysCheckTileRange ) {
+ int iPosXf = itLon;
+ int iPosYf = itLat;
for ( int j = 1; j < n; ++j ) {
- int iPosX = ( itLon + itStepLon * j ) >> 7;
- int iPosY = ( itLat + itStepLat * j ) >> 7;
- *scanLine = m_tile->pixel( iPosX, iPosY );
+ iPosXf += itStepLon;
+ iPosYf += itStepLat;
+ *scanLine = m_tile->pixel( iPosXf >> 7, iPosYf >> 7 );
++scanLine;
}
}
More information about the Marble-commits
mailing list