[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Sat Apr 24 15:43:51 CEST 2010
SVN commit 1118350 by jmhoffmann:
AbstractScanlineTextureMapper: remove protected data member m_interpolate
and use local variables instead.
m_interpolate was only used in derived classes and there only in mapTexture().
This is part of the effort to reduce state in texture mappers to make
parallel rendering in the future more easy.
M +0 -1 AbstractScanlineTextureMapper.cpp
M +0 -1 AbstractScanlineTextureMapper.h
M +4 -3 EquirectScanlineTextureMapper.cpp
M +4 -3 MercatorScanlineTextureMapper.cpp
M +5 -4 SphericalScanlineTextureMapper.cpp
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1118349:1118350
@@ -26,7 +26,6 @@
StackedTileLoader *tileLoader,
QObject *parent )
: QObject( parent ),
- m_interpolate( false ),
m_maxGlobalX( 0 ),
m_maxGlobalY( 0 ),
m_imageHeight( 0 ),
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.h #1118349:1118350
@@ -67,7 +67,6 @@
QRgb *scanLine, int n );
int interpolationStep( ViewParams *viewParams ) const;
- bool m_interpolate;
// method for fast integer calculation
void nextTile( int& posx, int& posy );
--- trunk/KDE/kdeedu/marble/src/lib/EquirectScanlineTextureMapper.cpp #1118349:1118350
@@ -67,6 +67,7 @@
// Evaluate the degree of interpolation
const int n = interpolationStep( viewParams );
+ bool interpolate = false;
bool interlaced = ( m_interlaced
|| viewParams->mapQuality() == LowQuality );
@@ -130,16 +131,16 @@
if ( x >= xIpLeft && x <= xIpRight ) {
x += n - 1;
lon += (n - 1) * pixel2Rad;
- m_interpolate = !printQuality;
+ interpolate = !printQuality;
}
else {
- m_interpolate = false;
+ interpolate = false;
}
if ( lon < -M_PI ) lon += 2 * M_PI;
if ( lon > M_PI ) lon -= 2 * M_PI;
- if ( m_interpolate ) {
+ if ( interpolate ) {
if (highQuality)
pixelValueApproxF( lon, lat, scanLine, n );
else
--- trunk/KDE/kdeedu/marble/src/lib/MercatorScanlineTextureMapper.cpp #1118349:1118350
@@ -71,6 +71,7 @@
// Evaluate the degree of interpolation
const int n = interpolationStep( viewParams );
+ bool interpolate = false;
bool interlaced = ( m_interlaced
|| viewParams->mapQuality() == LowQuality );
@@ -135,16 +136,16 @@
if ( x >= xIpLeft && x <= xIpRight ) {
x += n - 1;
lon += (n - 1) * pixel2Rad;
- m_interpolate = !printQuality;
+ interpolate = !printQuality;
}
else {
- m_interpolate = false;
+ interpolate = false;
}
if ( lon < -M_PI ) lon += 2 * M_PI;
if ( lon > M_PI ) lon -= 2 * M_PI;
- if ( m_interpolate ) {
+ if ( interpolate ) {
if (highQuality)
pixelValueApproxF( lon, lat, scanLine, n );
else
--- trunk/KDE/kdeedu/marble/src/lib/SphericalScanlineTextureMapper.cpp #1118349:1118350
@@ -63,6 +63,7 @@
// Evaluate the degree of interpolation
const int n = interpolationStep( viewParams );
+ bool interpolate = false;
// Calculate north pole position to decrease pole distortion later on
Quaternion northPole( 0.0, (qreal)( M_PI * 0.5 ) );
@@ -152,16 +153,16 @@
&& northPoleX < leftInterval + 2 * n
&& x < leftInterval + 3 * n )
{
- m_interpolate = false;
+ interpolate = false;
}
else {
x += n - 1;
- m_interpolate = !printQuality;
+ interpolate = !printQuality;
++ncount;
}
}
else
- m_interpolate = false;
+ interpolate = false;
// Evaluate more coordinates for the 3D position vector of
// the current pixel.
@@ -180,7 +181,7 @@
// Approx for n-1 out of n pixels within the boundary of
// xIpLeft to xIpRight
- if ( m_interpolate ) {
+ if ( interpolate ) {
if (highQuality)
pixelValueApproxF( lon, lat, scanLine, n );
else
More information about the Marble-commits
mailing list