No subject


Thu Feb 18 01:14:04 CET 2010


from the file system was moved to TileLoader.

In AbstractTile, m_created removed, the value is derived now from the
TextureTiles inside StackedTextureTile. setState was removed, the value is now
derived from the states of the TextureTiles.

Remaining issues:
- where should "clouds visible" property go?
  MarbleModel comes to mind as this is one level above MergeLayerDecorator
- instead of StackedTileLoader::loadTile having the forMergedLayerDecorator parameter
  one could think of using TileLoader inside MergedLayerDecorator
- extend DGML texture element or below with "mergeRule" possible values: Copy, Multiply

Changes made after the review, they all address issues pointed out by Torsten Rahn.
- Add comment that MarbleModel::textureLayer() needs work
- Rename class SimpleTileLoader to TileLoader
- Rename class SimpleTextureTile to TextureTile
- Rename class TileLoader to StackedTileLoader
- Rename class TextureTile to StackedTile, as it is now a stack of tiles
  which are then merged together into the result tile.
- AbstractScanlineTextureMapper::initTileSize(): add assertion that the tile size is not empty.

Besides, patch also contains a number of smaller changes which were needed in
preparation, the descriptions are referring to the old class names:
- TileId: add map theme id, needed do identify tiles across different map themes.
  This change breaks the cloudes layer again, this time it is because clouds
  rendering relies on TileLoader::updateTile triggering MarbleModel::paintTile,
  which is only done if the tile is found to be currently displayed, which is
  true for the underlying tile of the bluemarble theme, but not for the
  cloud tile. Now that TileId contains the map theme id, the cloud tile
  is no longer recognized as the bluemarble tile.
- MapThemeManager: add method mapThemes() which returns all map themes.
- TileLoader: add MapThemeManager parameter to constructor.
- TileLoader: add hash with texture layers.
- TileLoader::loadTile: switch over to new internal hash of texture layers.
- TileLoader: remove method layer() which returns the current texture layer.
  The current texture layer should not be part of TileLoader's state. So
  as a step towards the removal of this, remove method layer() which returns
  it and switch users of TileLoader::layer() over to alternatives.
- TileLoader: remove methods globalWidth() and globalHeight().
  As these methods depend on thew current texture layer and
  AbstractScanlineTextureMapper was the only user of these methods,
  move them there.
- TileLoader: switch updateTile methods from using the current texture layer
  over to the hash of texture layers and use the given TileId to select.
- TileLoader: remove unused signal paintTile.
- TileLoader: remove methods tileWidth() and tileHeight().
  The result of these methods depend on a given texture layer. As TileLoader's
  state should not contain a texture layer, move this to
  AbstractScanlineTextureMapper. A different possibility would have been to
  add a GeoSceneTexture parameter, but since these methods are not part of
  the tile loading core business, but more convenience methods for
  the texture mappers, I like it more this way.
- TileLoader: make maximumTileLevel() static again and add texture layer parameter.
  This way the texture layer can be removed from TileLoader's state.
  The parameter of TileLoaderHelp::themeStr() had to be constified for this to compile.
- TileLoader: remove setLayer method and corresponding data member.
- TileLoader::initTextureLayers: find really all texture layers.
  A map theme may have (and in fact some do) several texture layers, so
  we have to iterate through all layers to find them.
- MergedLayerDecorator: use TileLoader instead of maunally instanciating a
  TextureTile and then calling textureTile::loadDataset.
  In order to prevent infinite recursion, there is a (hard coded) check in
  TileLoader::mergeDecorations to prevent this (half heartedly).
  Loading/displaying of clouds layer if cloud tiles are not available locally
  remains broken.
- Fix constness of getters which return pointers to members.
  Const getters should return pointers to const member objects and
  non-const getters should return pointers to non-const member objects.
- Fix compilation after constness fixes in geodata/scene.
- TileLoader: remove old updateTile slot, in which the qimage data was read
  from the filesystem again instead of using the in-memory copy.
- TileLoaderHelper: we can pass a pointer to a const GeoSceneTexture here.
- GeoSceneTexture: add method hasMaximumTileLevel().

 M  +66 -43    AbstractScanlineTextureMapper.cpp  
 M  +15 -5     AbstractScanlineTextureMapper.h  
 M  +1 -22     AbstractTile.cpp  
 M  +0 -4      AbstractTile.h  
 M  +0 -7      AbstractTile_p.h  
 M  +4 -3      CMakeLists.txt  
 M  +5 -5      EquirectScanlineTextureMapper.cpp  
 M  +2 -2      EquirectScanlineTextureMapper.h  
 M  +12 -0     MapThemeManager.cpp  
 M  +6 -1      MapThemeManager.h  
 M  +4 -9      MarbleMap.cpp  
 M  +35 -18    MarbleModel.cpp  
 M  +3 -2      MarbleModel.h  
 M  +5 -5      MercatorScanlineTextureMapper.cpp  
 M  +2 -2      MercatorScanlineTextureMapper.h  
 M  +19 -99    MergedLayerDecorator.cpp  
 M  +5 -11     MergedLayerDecorator.h  
 M  +5 -5      SphericalScanlineTextureMapper.cpp  
 M  +3 -2      SphericalScanlineTextureMapper.h  
 A             StackedTile.cpp   [License: LGPL]
 A             StackedTile.h   TextureTile.h#1092223 [License: LGPL]
 A             StackedTileLoader.cpp   [License: LGPL (v2+)]
 A             StackedTileLoader.h   TileLoader.h#1092223 [License: LGPL (v2+)]
 A             StackedTile_p.h   TextureTile_p.h#1092223 [License: LGPL]
 M  +33 -459   TextureTile.cpp  
 M  +128 -61   TextureTile.h  
 D             TextureTile_p.h  
 M  +18 -10    TileId.cpp  
 M  +14 -5     TileId.h  
 M  +117 -348  TileLoader.cpp  
 M  +55 -173   TileLoader.h  
 M  +3 -3      TileLoaderHelper.cpp  
 M  +2 -2      TileLoaderHelper.h  
 M  +15 -0     geodata/scene/GeoSceneMap.cpp  
 M  +1 -0      geodata/scene/GeoSceneMap.h  
 M  +0 -1      geodata/scene/GeoSceneMapTheme.cpp  
 M  +6 -0      geodata/scene/GeoSceneTexture.h  


http://websvn.kde.org/?view=rev&revision=1092224


More information about the Marble-commits mailing list