Cogs.Core
Public Member Functions | Public Attributes | Private Attributes | List of all members
Cogs::BridgeRasterSource Class Reference
Inheritance diagram for Cogs::BridgeRasterSource:
Cogs::RasterSource

Public Member Functions

 BridgeRasterSource (CogsContext *context, RasterSourceParameters *parameters)
 
void requestTile (const TileLoadRequest &request) override
 
void allocateTileStorage (const size_t textureSize, std::vector< uint8_t > &buffer) override
 
void deallocateTileStorage (std::vector< uint8_t > &buffer) override
 
void loadInvalidTile (RasterTile *tile)
 
void loadEmptyTileData (RasterTile *tile)
 
uint32_t getFlags () const
 
- Public Member Functions inherited from Cogs::RasterSource
std::vector< RasterLevel > & getLevels ()
 
const std::vector< RasterLevel > & getLevels () const
 
int getTileWidth () const
 
int getTileHeight () const
 
virtual void requestTile (const TileLoadRequest &request)=0
 
void lock ()
 
void unlock ()
 
TextureHandle loadTexture (const unsigned char *data, const int width, const int height, const TextureFormat format, const size_t size)
 
void releaseTexture (TextureHandle texture, const size_t size)
 
RasterTilegetTile (const RasterTileIdentifier &identifier)
 
RasterTilegetTile (const size_t id)
 
void loadTileData (RasterTile *tile, size_t requestGeneration, std::vector< uint8_t > &data, TextureHandle textureHandle, TextureFormat format, size_t size)
 
void invalidateTile (const RasterTileIdentifier &id, InvalidationFlags::EInvalidationFlags flags=InvalidationFlags::InvalidateParents)
 
void cancelActiveRequests ()
 Cancels all active requests.
 
void purgeCache ()
 Purge all cache, including resident data.
 
void purgeResidentCache ()
 Purge tile data resident in memory and on the GPU.
 
void purgeOldData ()
 Purges orphaned tile data that has been replaced with new contents.
 
void releaseTileData (RasterTileData &tileData)
 Release the given tile data.
 
bool tryGetTextureHandle (const RasterTile *tile, TextureHandle &handle)
 
void updateTileUsage (const RasterTile *tile)
 
void refTile (RasterTile *tile)
 
void unrefTile (RasterTile *tile)
 
void removeTileUsageData (size_t code)
 
void removeTile (RasterTile *tile)
 
void evictLruTile ()
 
RasterTileDatagetTileData (RasterTile *tile)
 
virtual void allocateTileStorage (const size_t textureSize, std::vector< uint8_t > &buffer)=0
 
virtual void deallocateTileStorage (std::vector< uint8_t > &buffer)=0
 
void addSubscriber (struct RasterSourceSubscription *handler)
 
void removeSubscriber (struct RasterSourceSubscription *handler)
 
bool hasProcessingRequests () const
 

Public Attributes

CogsContext * context = nullptr
 
std::atomic< int > closures = { 0 }
 
const size_t cacheSize = 0
 
bool suppressCompressionError = false
 
bool suppressDimensionError = false
 
- Public Attributes inherited from Cogs::RasterSource
struct Cogs::RasterSource::Processing processing
 
std::unordered_set< struct RasterSourceSubscription * > subscribers
 
std::mutex subscriberMutex
 
IGraphicsDevicedevice = nullptr
 
std::atomic< size_t > textureBufferSize = 0
 
TextureFormat format = TextureFormat::Unknown
 
bool isHeight = false
 
float minZ = 0
 
float maxZ = 0
 
std::string name
 
std::atomic< size_t > generation = 0
 

Private Attributes

int64_t providerId = 0
 
uint32_t flags = 0
 
TileRequestCallback * requestCallback = nullptr
 
AllocationCallback * allocationCallback = nullptr
 
DeallocationCallback * deallocationCallback = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from Cogs::RasterSource
std::vector< RasterLevellevels
 
int tileLongitudePosts = 0
 
int tileLatitudePosts = 0
 
TextureHandle invalidTileHandle
 

Detailed Description

Definition at line 10 of file BridgeRasterSource.h.

Constructor & Destructor Documentation

◆ BridgeRasterSource()

Cogs::BridgeRasterSource::BridgeRasterSource ( CogsContext *  context,
RasterSourceParameters parameters 
)

Definition at line 201 of file BridgeRasterSource.cpp.

◆ ~BridgeRasterSource()

Cogs::BridgeRasterSource::~BridgeRasterSource ( )

Definition at line 262 of file BridgeRasterSource.cpp.

Member Function Documentation

◆ allocateTileStorage()

void Cogs::BridgeRasterSource::allocateTileStorage ( const size_t  textureSize,
std::vector< uint8_t > &  buffer 
)
overridevirtual

Implements Cogs::RasterSource.

Definition at line 297 of file BridgeRasterSource.cpp.

◆ deallocateTileStorage()

void Cogs::BridgeRasterSource::deallocateTileStorage ( std::vector< uint8_t > &  buffer)
overridevirtual

Implements Cogs::RasterSource.

Definition at line 306 of file BridgeRasterSource.cpp.

◆ getFlags()

uint32_t Cogs::BridgeRasterSource::getFlags ( ) const
inline

Definition at line 23 of file BridgeRasterSource.h.

◆ loadEmptyTileData()

void Cogs::BridgeRasterSource::loadEmptyTileData ( RasterTile tile)

Definition at line 339 of file BridgeRasterSource.cpp.

◆ loadInvalidTile()

void Cogs::BridgeRasterSource::loadInvalidTile ( RasterTile tile)

Definition at line 323 of file BridgeRasterSource.cpp.

◆ requestTile()

void Cogs::BridgeRasterSource::requestTile ( const TileLoadRequest request)
overridevirtual

Implements Cogs::RasterSource.

Definition at line 267 of file BridgeRasterSource.cpp.

Member Data Documentation

◆ allocationCallback

AllocationCallback* Cogs::BridgeRasterSource::allocationCallback = nullptr
private

Definition at line 41 of file BridgeRasterSource.h.

◆ cacheSize

const size_t Cogs::BridgeRasterSource::cacheSize = 0

Definition at line 30 of file BridgeRasterSource.h.

◆ closures

std::atomic<int> Cogs::BridgeRasterSource::closures = { 0 }

Definition at line 28 of file BridgeRasterSource.h.

◆ context

CogsContext* Cogs::BridgeRasterSource::context = nullptr

Definition at line 26 of file BridgeRasterSource.h.

◆ deallocationCallback

DeallocationCallback* Cogs::BridgeRasterSource::deallocationCallback = nullptr
private

Definition at line 42 of file BridgeRasterSource.h.

◆ flags

uint32_t Cogs::BridgeRasterSource::flags = 0
private

Definition at line 37 of file BridgeRasterSource.h.

◆ providerId

int64_t Cogs::BridgeRasterSource::providerId = 0
private

Definition at line 36 of file BridgeRasterSource.h.

◆ requestCallback

TileRequestCallback* Cogs::BridgeRasterSource::requestCallback = nullptr
private

Definition at line 39 of file BridgeRasterSource.h.

◆ suppressCompressionError

bool Cogs::BridgeRasterSource::suppressCompressionError = false

Definition at line 32 of file BridgeRasterSource.h.

◆ suppressDimensionError

bool Cogs::BridgeRasterSource::suppressDimensionError = false

Definition at line 33 of file BridgeRasterSource.h.


The documentation for this class was generated from the following files: