SAFR Windows SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
RealNetworks.CameraKit.ImageCache Class Reference

An image cache maintains a cache of GPU-based and / or CPU-based images. This allows efficient reuse of images. More...

Inheritance diagram for RealNetworks.CameraKit.ImageCache:

Public Member Functions

 ImageCache (Accelerator accel, PixelFormat pixelFormat)
 Creates a new image cache instance which uses the provided accelerator to allocate image instances. More...
 
void Dispose ()
 
void Dispose (bool disposing)
 
Image CreateImage (int width, int height)
 Returns a new image from the image cache. Null is returned if the image can not be reused from the cache or created on demand. E.g. the caller is asking for a texture-based image but the image cache was instantiated without an accelerator. More...
 

Properties

ImageCacheStatistics Statistics [get]
 Returns the current statistics. More...
 

Detailed Description

An image cache maintains a cache of GPU-based and / or CPU-based images. This allows efficient reuse of images.

Constructor & Destructor Documentation

◆ ImageCache()

RealNetworks.CameraKit.ImageCache.ImageCache ( Accelerator  accel,
PixelFormat  pixelFormat 
)

Creates a new image cache instance which uses the provided accelerator to allocate image instances.

Parameters
accelthe accelerator
pixelFormatthe preferred pixel format

Member Function Documentation

◆ CreateImage()

Image RealNetworks.CameraKit.ImageCache.CreateImage ( int  width,
int  height 
)

Returns a new image from the image cache. Null is returned if the image can not be reused from the cache or created on demand. E.g. the caller is asking for a texture-based image but the image cache was instantiated without an accelerator.

Parameters
widththe desired image width
heightthe desired image height
Returns

◆ Dispose() [1/2]

void RealNetworks.CameraKit.ImageCache.Dispose ( )

◆ Dispose() [2/2]

void RealNetworks.CameraKit.ImageCache.Dispose ( bool  disposing)

Property Documentation

◆ Statistics

ImageCacheStatistics RealNetworks.CameraKit.ImageCache.Statistics
get

Returns the current statistics.