Mir
interpreter_cache.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_ANDROID_INTERPRETER_CACHE_H_
20 #define MIR_GRAPHICS_ANDROID_INTERPRETER_CACHE_H_
21 
23 #include <unordered_map>
24 
25 namespace mir
26 {
27 namespace graphics
28 {
29 namespace android
30 {
32 {
33 public:
35 
36  void store_buffer(std::shared_ptr<graphics::Buffer>const& buffer,
37  std::shared_ptr<graphics::NativeBuffer> const& key);
38  std::shared_ptr<graphics::Buffer> retrieve_buffer(ANativeWindowBuffer* key);
39  void update_native_fence(ANativeWindowBuffer* key, int fence);
40 
41 private:
42  std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<graphics::Buffer>> buffers_in_driver;
43  std::unordered_map<ANativeWindowBuffer*, std::shared_ptr<graphics::NativeBuffer>> native_buffers;
44 };
45 }
46 }
47 }
48 #endif /* MIR_GRAPHICS_ANDROID_INTERPRETER_CACHE_H_ */
All things Mir.
Definition: atomic_callback.h:25
InterpreterCache()
Definition: interpreter_cache.h:34
Definition: interpreter_cache.h:31
std::shared_ptr< graphics::Buffer > retrieve_buffer(ANativeWindowBuffer *key)
Definition: interpreter_cache.cpp:35
void update_native_fence(ANativeWindowBuffer *key, int fence)
Definition: interpreter_cache.cpp:52
Definition: interpreter_resource_cache.h:33
Definition: android_input_receiver.h:36
void store_buffer(std::shared_ptr< graphics::Buffer >const &buffer, std::shared_ptr< graphics::NativeBuffer > const &key)
Definition: interpreter_cache.cpp:28

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015