20 #ifndef MIR_COMPOSITOR_RECENTLY_USED_CACHE_H_
21 #define MIR_COMPOSITOR_RECENTLY_USED_CACHE_H_
26 #include <unordered_map>
43 : texture(std::make_shared<graphics::GLTexture>())
45 std::shared_ptr<graphics::GLTexture> texture;
48 bool valid_binding{
false};
49 std::shared_ptr<graphics::Buffer> resource;
52 std::unordered_map<graphics::Renderable::ID, Entry> textures;
std::shared_ptr< graphics::GLTexture > load(graphics::Renderable const &renderable) override
Loads texture from the renderable.
Definition: recently_used_cache.cpp:28
All things Mir.
Definition: buffer_stream.h:37
void invalidate() override
Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time...
Definition: recently_used_cache.cpp:47
Definition: renderable.h:33
Definition: recently_used_cache.h:32
Definition: gl_texture_cache.h:30
void drop_unused() override
Free textures that were not used (loaded) since the last drop/invalidate.
Definition: recently_used_cache.cpp:53