[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Wed Jan 19 18:11:49 CET 2011
SVN commit 1215793 by beschow:
forward-port r1211245: TileScalingTextureMapper: do not paint the background black if the map doesn't cover the whole viewport
* this code doesn't seem to be needed (tested visually)
* this code depended on the canvas image, which we want to get rid of for pixmap caching
M +1 -31 TileScalingTextureMapper.cpp
M +0 -1 TileScalingTextureMapper.h
--- trunk/KDE/kdeedu/marble/src/lib/TileScalingTextureMapper.cpp #1215792:1215793
@@ -34,8 +34,7 @@
TileScalingTextureMapper::TileScalingTextureMapper( StackedTileLoader *tileLoader,
QObject *parent )
: AbstractScanlineTextureMapper( tileLoader, parent ),
- m_repaintNeeded( true ),
- m_oldYPaintedTop( 0 )
+ m_repaintNeeded( true )
{
}
@@ -120,35 +119,6 @@
painter.end();
- int yTop;
- int yPaintedTop;
- int yPaintedBottom;
-
- // Calculate y-range the represented by the center point, yTop and
- // what actually can be painted
- yPaintedTop = yTop = ( - yNormalizedCenter ) * ( 4 * radius ) + imageHeight / 2;
- yPaintedBottom = ( 1.0 - yNormalizedCenter ) * ( 4 * radius ) + imageHeight / 2;
-
- if (yPaintedTop < 0) yPaintedTop = 0;
- if (yPaintedTop > imageHeight) yPaintedTop = imageHeight;
- if (yPaintedBottom < 0) yPaintedBottom = 0;
- if (yPaintedBottom > imageHeight) yPaintedBottom = imageHeight;
-
- // Remove unused lines
- const int clearStart = ( yPaintedTop - m_oldYPaintedTop <= 0 ) ? yPaintedBottom : 0;
- const int clearStop = ( yPaintedTop - m_oldYPaintedTop <= 0 ) ? imageHeight : yTop;
-
- QRgb * const clearBegin = (QRgb*)( canvasImage->scanLine( clearStart ) );
- QRgb * const clearEnd = (QRgb*)( canvasImage->scanLine( clearStop ) );
-
- QRgb * it = clearBegin;
-
- for ( ; it < clearEnd; ++it ) {
- *(it) = 0;
- }
-
- m_oldYPaintedTop = yPaintedTop;
-
m_tileLoader->cleanupTilehash();
if ( texColorizer ) {
--- trunk/KDE/kdeedu/marble/src/lib/TileScalingTextureMapper.h #1215792:1215793
@@ -37,7 +37,6 @@
private:
bool m_repaintNeeded;
- int m_oldYPaintedTop;
};
}
More information about the Marble-commits
mailing list