[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/marble/marble-1.1/src/lib
From:       Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date:       2011-01-19 17:12:50
Message-ID: 20110119171250.BFADBAC8BA () svn ! kde ! org
[Download RAW message or body]

SVN commit 1215804 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  


--- branches/marble/marble-1.1/src/lib/TileScalingTextureMapper.cpp #1215803:1215804
@@ -34,8 +34,7 @@
 TileScalingTextureMapper::TileScalingTextureMapper( StackedTileLoader *tileLoader,
                                                     QObject *parent )
     : AbstractScanlineTextureMapper( tileLoader, parent ),
-      m_repaintNeeded( true ),
-      m_oldYPaintedTop( 0 )
+      m_repaintNeeded( true )
 {
 }
 
@@ -119,35 +118,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 ) {
--- branches/marble/marble-1.1/src/lib/TileScalingTextureMapper.h #1215803:1215804
@@ -37,7 +37,6 @@
 
  private:
     bool   m_repaintNeeded;
-    int m_oldYPaintedTop;
 };
 
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic