[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Wed Jul 21 22:36:18 CEST 2010
SVN commit 1152723 by beschow:
remove GeoSceneTexture parameter from StackedTileLoader::mergeDecorations()
M +1 -1 MarbleModel.cpp
M +1 -1 MarbleModel.h
M +6 -16 StackedTileLoader.cpp
M +1 -2 StackedTileLoader.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1152722:1152723
@@ -891,7 +891,7 @@
}
}
-void MarbleModel::paintTile( StackedTile* tile, GeoSceneTexture *textureLayer )
+void MarbleModel::paintTile( StackedTile* tile, const GeoSceneTexture *textureLayer )
{
// mDebug() << "MarbleModel::paintTile: " << "x: " << x << "y:" << y << "level: " << level
// << "requestTileUpdate" << requestTileUpdate;
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.h #1152722:1152723
@@ -294,7 +294,7 @@
void clearPersistentTileCache();
// private Q_SLOTS:
- void paintTile( StackedTile* tile, GeoSceneTexture *textureLayer );
+ void paintTile( StackedTile* tile, const GeoSceneTexture *textureLayer );
/**
* @brief Update the model
--- trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.cpp #1152722:1152723
@@ -196,8 +196,6 @@
}
}
- GeoSceneTexture * const texture = d->m_textureLayers[ stackedTileId.mapThemeIdHash() ];
-
// tile (valid) has not been found in hash or cache, so load it from disk
// and place it in the hash from where it will get transferred to the cache
@@ -227,7 +225,7 @@
if ( stackedTile->state() != StackedTile::TileEmpty ) {
stackedTile->initResultTile();
- mergeDecorations( stackedTile, texture );
+ mergeDecorations( stackedTile );
}
return stackedTile;
}
@@ -389,7 +387,7 @@
if ( displayedTile ) {
displayedTile->deriveCompletionState();
displayedTile->initResultTile();
- mergeDecorations( displayedTile, findTextureLayer( stackedTileId ));
+ mergeDecorations( displayedTile );
emit tileUpdateAvailable();
}
else {
@@ -397,7 +395,7 @@
if ( cachedTile ) {
cachedTile->deriveCompletionState();
cachedTile->initResultTile();
- mergeDecorations( cachedTile, findTextureLayer( stackedTileId ));
+ mergeDecorations( cachedTile );
}
}
}
@@ -425,13 +423,6 @@
return textureLayer;
}
-inline GeoSceneTexture * StackedTileLoader::findTextureLayer( TileId const & id )
-{
- GeoSceneTexture * const textureLayer = d->m_textureLayers.value( id.mapThemeIdHash(), 0 );
- Q_ASSERT( textureLayer );
- return textureLayer;
-}
-
//
QVector<GeoSceneTexture const *>
StackedTileLoader::findRelevantTextureLayers( TileId const & stackedTileId ) const
@@ -507,12 +498,11 @@
d->m_tileLoader->setTextureLayers( d->m_textureLayers );
}
-void StackedTileLoader::mergeDecorations( StackedTile * const tile,
- GeoSceneTexture * const textureLayer ) const
+void StackedTileLoader::mergeDecorations( StackedTile * const tile ) const
{
Q_ASSERT( tile->state() != StackedTile::TileEmpty );
if ( !tile->forMergedLayerDecorator() )
- m_parent->paintTile( tile, textureLayer );
+ m_parent->paintTile( tile, findTextureLayer( tile->id() ) );
}
// This method should not alter m_tileCache, as the given tile is managed
@@ -530,7 +520,7 @@
}
cachedTile->deriveCompletionState();
cachedTile->initResultTile();
- mergeDecorations( cachedTile, findTextureLayer( cachedTile->id() ));
+ mergeDecorations( cachedTile );
emit tileUpdateAvailable();
}
--- trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.h #1152722:1152723
@@ -163,10 +163,9 @@
Q_DISABLE_COPY( StackedTileLoader )
GeoSceneLayer const * findSceneLayer( TileId const & ) const;
GeoSceneTexture const * findTextureLayer( TileId const & ) const;
- GeoSceneTexture * findTextureLayer( TileId const & );
QVector<GeoSceneTexture const *>
findRelevantTextureLayers( TileId const & stackedTileId ) const;
- void mergeDecorations( StackedTile * const, GeoSceneTexture * const ) const;
+ void mergeDecorations( StackedTile * const ) const;
void reloadCachedTile( StackedTile * const cachedTile, DownloadUsage const );
StackedTileLoaderPrivate* const d;
More information about the Marble-commits
mailing list