Mir
Public Member Functions | Protected Member Functions | List of all members
mir::graphics::GLTextureCache Class Referenceabstract

#include <gl_texture_cache.h>

Inheritance diagram for mir::graphics::GLTextureCache:
[legend]

Public Member Functions

virtual ~GLTextureCache ()=default
 
virtual std::shared_ptr< GLTextureload (Renderable const &)=0
 Loads texture from the renderable. More...
 
virtual void invalidate ()=0
 Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time. More...
 
virtual void drop_unused ()=0
 Free textures that were not used (loaded) since the last drop/invalidate. More...
 

Protected Member Functions

 GLTextureCache ()=default
 

Constructor & Destructor Documentation

virtual mir::graphics::GLTextureCache::~GLTextureCache ( )
virtualdefault
mir::graphics::GLTextureCache::GLTextureCache ( )
protecteddefault

Member Function Documentation

virtual void mir::graphics::GLTextureCache::drop_unused ( )
pure virtual

Free textures that were not used (loaded) since the last drop/invalidate.

Must be called with a current GL context.

Implemented in mir::compositor::RecentlyUsedCache.

virtual void mir::graphics::GLTextureCache::invalidate ( )
pure virtual

Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time.

This function must be implemented in a way that does not require a GL context, as it will typically be called without one.

Implemented in mir::compositor::RecentlyUsedCache.

virtual std::shared_ptr<GLTexture> mir::graphics::GLTextureCache::load ( Renderable const &  )
pure virtual

Loads texture from the renderable.

Must be called with a current GL context.

Parameters
[in]renderableThe Renderable that needs to be used as a texture
Returns
The texture that represents the renderable.

Implemented in mir::compositor::RecentlyUsedCache.


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

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015