14#include <boost/thread.hpp>
51 using Ptr = std::shared_ptr<TileInitialisationObserver>;
52 using WeakPtr = std::weak_ptr<TileInitialisationObserver>;
63 virtual void tileCreated(
const std::shared_ptr<CompressedTile>& tile);
73 virtual void tileFinished(
const std::shared_ptr<CompressedTile>& tile);
82 using Ptr = std::shared_ptr<TileLoadingObserver>;
83 using WeakPtr = std::weak_ptr<TileLoadingObserver>;
107 using Ptr = std::shared_ptr<CompressedTile>;
250 using Ptr = std::shared_ptr<Layer>;
269 static Ptr create(
int layerWidth,
int layerHeight,
int bpp);
PageProvider::Ptr provider
Definition blob-tests.cc:26
Definition tiledbitmaplayer.hh:105
TileState getState()
Definition compressedtile.cc:179
ConstTile::Ptr getConstTileSync()
Definition compressedtile.cc:47
void close(ViewInterface::WeakPtr vi) override
Definition compressedtile.cc:287
Scroom::MemoryBlobs::PageProvider::Ptr provider
Definition tiledbitmaplayer.hh:119
TileStateInternal state
Definition tiledbitmaplayer.hh:116
const int depth
Definition tiledbitmaplayer.hh:110
const int y
Definition tiledbitmaplayer.hh:112
const int x
Definition tiledbitmaplayer.hh:111
void notifyObservers(const ConstTile::Ptr &tile)
Definition compressedtile.cc:274
ConstTile::Ptr do_load()
Definition compressedtile.cc:133
Tile::WeakPtr tile
Definition tiledbitmaplayer.hh:117
void observerAdded(TileInitialisationObserver::Ptr const &observer, Scroom::Bookkeeping::Token const &token) override
Definition compressedtile.cc:211
Scroom::Utils::WeakKeyMap< ViewInterface::WeakPtr, std::weak_ptr< TileViewState > > viewStates
Definition tiledbitmaplayer.hh:126
static Ptr create(int depth, int x, int y, int bpp, const Scroom::MemoryBlobs::PageProvider::Ptr &provider, TileStateInternal state=TSI_UNINITIALIZED)
Definition compressedtile.cc:33
Tile::Ptr getTileSync()
Definition compressedtile.cc:58
ConstTile::Ptr getConstTileAsync()
Definition compressedtile.cc:87
Scroom::Bookkeeping::Token registerStrongObserver(TileLoadingObserver::Ptr const &observer)
Definition tiledbitmaplayer.hh:180
Scroom::Bookkeeping::Token registerObserver(TileLoadingObserver::WeakPtr const &observer)
Definition tiledbitmaplayer.hh:184
void open(ViewInterface::WeakPtr vi) override
Definition compressedtile.cc:282
ThreadPool::Queue::WeakPtr queue
Definition tiledbitmaplayer.hh:124
std::shared_ptr< TileViewState > getViewState(const ViewInterface::WeakPtr &vi)
Definition compressedtile.cc:166
Tile::Ptr initialize()
Definition compressedtile.cc:93
Scroom::Bookkeeping::Token registerStrongObserver(TileInitialisationObserver::Ptr const &observer)
Definition tiledbitmaplayer.hh:172
Scroom::MemoryBlobs::Blob::Ptr data
Definition tiledbitmaplayer.hh:120
boost::mutex tileData
Definition tiledbitmaplayer.hh:122
void reportFinished()
Definition compressedtile.cc:119
void cleanupState()
Definition compressedtile.cc:264
boost::mutex stateData
Definition tiledbitmaplayer.hh:121
std::shared_ptr< CompressedTile > Ptr
Definition tiledbitmaplayer.hh:107
Scroom::Bookkeeping::Token registerObserver(TileInitialisationObserver::WeakPtr const &observer)
Definition tiledbitmaplayer.hh:176
const int bpp
Definition tiledbitmaplayer.hh:113
ConstTile::WeakPtr constTile
Definition tiledbitmaplayer.hh:118
std::weak_ptr< ConstTile > WeakPtr
Definition tile.hh:46
std::shared_ptr< ConstTile > Ptr
Definition tile.hh:45
Definition interface.hh:11
Definition tiledbitmaplayer.hh:248
int horTileCount
Definition tiledbitmaplayer.hh:256
void close(ViewInterface::WeakPtr vi) override
Definition layer.cc:177
Scroom::MemoryBlobs::PageProvider::Ptr getPageProvider()
Definition tiledbitmaplayer.hh:288
int depth
Definition tiledbitmaplayer.hh:253
CompressedTileLine lineOutOfBounds
Definition tiledbitmaplayer.hh:260
void fetchData(SourcePresentation::Ptr sp, const ThreadPool::WeakQueue::Ptr &queue, std::function< void()> on_finished)
Definition layer.cc:151
Scroom::Bookkeeping::Token registerObserver(const TileInitialisationObserver::Ptr &observer)
Definition layer.cc:113
std::shared_ptr< Layer > Ptr
Definition tiledbitmaplayer.hh:250
CompressedTile::Ptr outOfBounds
Definition tiledbitmaplayer.hh:259
Scroom::Utils::Rectangle< int > getRect() const
Definition tiledbitmaplayer.hh:284
int height
Definition tiledbitmaplayer.hh:255
int width
Definition tiledbitmaplayer.hh:254
CompressedTile::Ptr getTile(int i, int j)
Definition layer.cc:131
int getDepth() const
Definition tiledbitmaplayer.hh:282
int verTileCount
Definition tiledbitmaplayer.hh:257
static Ptr create(int depth, int layerWidth, int layerHeight, int bpp, Scroom::MemoryBlobs::PageProvider::Ptr provider)
Definition layer.cc:101
int getHeight() const
Definition tiledbitmaplayer.hh:280
int getHorTileCount() const
Definition layer.cc:127
Scroom::Logger logger
Definition tiledbitmaplayer.hh:262
int getWidth() const
Definition tiledbitmaplayer.hh:278
CompressedTileGrid tiles
Definition tiledbitmaplayer.hh:258
int getVerTileCount() const
Definition layer.cc:129
Scroom::MemoryBlobs::PageProvider::Ptr pageProvider
Definition tiledbitmaplayer.hh:261
CompressedTileLine & getTileLine(int j)
Definition layer.cc:141
void open(ViewInterface::WeakPtr vi) override
Definition layer.cc:161
Definition bookkeeping.hh:50
std::shared_ptr< Blob > Ptr
Definition memoryblobs.hh:77
std::shared_ptr< PageProvider > Ptr
Definition memoryblobs.hh:40
Definition utilities.hh:34
Definition observable.hh:71
Scroom::Bookkeeping::Token registerStrongObserver(Observer const &observer)
Definition observable.hh:212
Scroom::Bookkeeping::Token registerObserver(ObserverWeak const &observer)
Definition observable.hh:232
Definition rectangle.hh:29
std::shared_ptr< SourcePresentation > Ptr
Definition tiledbitmapinterface.hh:192
std::weak_ptr< Queue > WeakPtr
Definition threadpool.hh:79
std::shared_ptr< WeakQueue > Ptr
Definition threadpool.hh:133
Definition tiledbitmaplayer.hh:49
virtual void tileFinished(const std::shared_ptr< CompressedTile > &tile)
TileInitialisationObserver.
Definition compressedtile.cc:292
std::shared_ptr< TileInitialisationObserver > Ptr
Definition tiledbitmaplayer.hh:51
std::weak_ptr< TileInitialisationObserver > WeakPtr
Definition tiledbitmaplayer.hh:52
virtual void tileCreated(const std::shared_ptr< CompressedTile > &tile)
Definition compressedtile.cc:294
Definition tiledbitmaplayer.hh:80
std::shared_ptr< TileLoadingObserver > Ptr
Definition tiledbitmaplayer.hh:82
std::weak_ptr< TileLoadingObserver > WeakPtr
Definition tiledbitmaplayer.hh:83
virtual void tileLoaded(ConstTile::Ptr tile)=0
Definition tileviewstate.hh:27
std::shared_ptr< Tile > Ptr
Definition tile.hh:19
std::weak_ptr< Tile > WeakPtr
Definition tile.hh:20
std::weak_ptr< ViewInterface > WeakPtr
Definition viewinterface.hh:194
Definition presentationinterface.hh:32
std::map< K, V, std::owner_less< K > > WeakKeyMap
Definition utilities.hh:118
TestObserver::Ptr observer
Definition observable-tests.cc:91
ViewInterface::Ptr const vi
Definition pipette-tests.cc:186
Scroom::Bookkeeping::Token const token
Definition pipette-tests.cc:269
TileState
Definition tiledbitmapinterface.hh:32
std::vector< CompressedTile::Ptr > CompressedTileLine
Definition tiledbitmaplayer.hh:240
TileStateInternal
Definition tiledbitmaplayer.hh:34
@ TSI_NORMAL
Definition tiledbitmaplayer.hh:36
@ TSI_OUT_OF_BOUNDS
Definition tiledbitmaplayer.hh:37
@ TSI_LOADING_ASYNCHRONOUSLY
Definition tiledbitmaplayer.hh:39
@ TSI_LOADING_SYNCHRONOUSLY
Definition tiledbitmaplayer.hh:38
@ TSI_UNINITIALIZED
Definition tiledbitmaplayer.hh:35
std::vector< CompressedTileLine > CompressedTileGrid
Definition tiledbitmaplayer.hh:241