Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
egl_resources.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 it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as 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: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_EGL_RESOURCES_H_
20 #define MIR_GRAPHICS_EGL_RESOURCES_H_
21 
22 #include <EGL/egl.h>
23 
24 namespace mir
25 {
26 namespace graphics
27 {
28 
30 {
31 public:
32  EGLContextStore(EGLDisplay egl_display, EGLContext egl_context);
33  ~EGLContextStore() noexcept;
34 
35  operator EGLContext() const;
36 
37 private:
38  EGLContextStore(EGLContextStore const&) = delete;
39  EGLContextStore& operator=(EGLContextStore const&) = delete;
40 
41  EGLDisplay const egl_display_;
42  EGLContext const egl_context_;
43 };
44 
46 {
47 public:
48  EGLSurfaceStore(EGLDisplay egl_display, EGLSurface egl_surface);
49 
50  ~EGLSurfaceStore() noexcept;
51 
52  operator EGLSurface() const;
53 
54 private:
55  EGLSurfaceStore(EGLSurfaceStore const&) = delete;
56  EGLSurfaceStore& operator=(EGLSurfaceStore const&) = delete;
57 
58  EGLDisplay const egl_display_;
59  EGLSurface const egl_surface_;
60 };
61 
62 }
63 }
64 
65 #endif /* MIR_GRAPHICS_EGL_RESOURCES_H_ */

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Oct 15 00:23:28 UTC 2013