2
* Copyright © 2015 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 or 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
19
#ifndef MIR_TYPO_GLCACHE_H_
20
#define MIR_TYPO_GLCACHE_H_
22
#include "typo_renderer.h"
24
#include <unordered_map>
27
namespace mir { namespace typo {
36
int width = 0, height = 0;
40
explicit GLCache(std::shared_ptr<Renderer> const&);
42
void change_renderer(std::shared_ptr<Renderer> const&);
43
Entry const& get(char const* str);
45
void mark_all_unused();
49
typedef std::unordered_map<std::string, Entry> Map;
51
std::shared_ptr<Renderer> renderer;
54
} } // namespace mir::typo
56
#endif // MIR_TYPO_GLCACHE_H_