File indexing completed on 2024-04-21 03:49:32

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2007 Carlos Licea <carlos _licea@hotmail.com>
0004 // SPDX-FileCopyrightText: 2008 Inge Wallin <inge@lysator.liu.se>
0005 // SPDX-FileCopyrightText: 2011 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
0006 //
0007 
0008 #ifndef MARBLE_EQUIRECTSCANLINETEXTUREMAPPER_H
0009 #define MARBLE_EQUIRECTSCANLINETEXTUREMAPPER_H
0010 
0011 
0012 #include "TextureMapperInterface.h"
0013 
0014 #include "MarbleGlobal.h"
0015 
0016 #include <QThreadPool>
0017 #include <QImage>
0018 
0019 
0020 namespace Marble
0021 {
0022 class StackedTileLoader;
0023 
0024 class EquirectScanlineTextureMapper : public TextureMapperInterface
0025 {
0026  public:
0027     explicit EquirectScanlineTextureMapper( StackedTileLoader *tileLoader );
0028 
0029     void mapTexture( GeoPainter *painter,
0030                              const ViewportParams *viewport,
0031                              int tileZoomLevel,
0032                              const QRect &dirtyRect,
0033                              TextureColorizer *texColorizer ) override;
0034 
0035  private:
0036     void mapTexture( const ViewportParams *viewport, int tileZoomLevel, MapQuality mapQuality );
0037 
0038  private:
0039     class RenderJob;
0040 
0041     StackedTileLoader *const m_tileLoader;
0042     int m_radius;
0043     QImage m_canvasImage;
0044     int    m_oldYPaintedTop;
0045     QThreadPool m_threadPool;
0046 };
0047 
0048 }
0049 
0050 #endif