Mir
Classes | Public Member Functions | List of all members
mir::gl::RecentlyUsedCache Class Reference

#include <recently_used_cache.h>

Inheritance diagram for mir::gl::RecentlyUsedCache:
[legend]

Public Member Functions

std::shared_ptr< Textureload (graphics::Renderable const &renderable) override
 Loads texture from the renderable. More...
 
void invalidate () override
 Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time. More...
 
void drop_unused () override
 Free textures that were not used (loaded) since the last drop/invalidate. More...
 
- Public Member Functions inherited from mir::gl::TextureCache
virtual ~TextureCache ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from mir::gl::TextureCache
 TextureCache ()=default
 

Member Function Documentation

void mir::gl::RecentlyUsedCache::drop_unused ( )
overridevirtual

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

Must be called with a current GL context.

Implements mir::gl::TextureCache.

void mir::gl::RecentlyUsedCache::invalidate ( )
overridevirtual

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.

Implements mir::gl::TextureCache.

std::shared_ptr< mgl::Texture > mir::gl::RecentlyUsedCache::load ( graphics::Renderable const &  )
overridevirtual

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.

Implements mir::gl::TextureCache.


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

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016