Mir
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);
34 
35  ~EGLContextStore() noexcept;
36 
37  operator EGLContext() const;
38 
39 private:
40  EGLContextStore(EGLContextStore const&) = delete;
41  EGLContextStore& operator=(EGLContextStore const&) = delete;
42 
43  EGLDisplay egl_display_;
44  EGLContext egl_context_;
45 };
46 
48 {
49 public:
51  EGLSurfaceStore(EGLDisplay egl_display, EGLSurface egl_surface,
52  enum AllowNoSurface allow_no_surface);
53  EGLSurfaceStore(EGLDisplay egl_display, EGLSurface egl_surface);
55 
56  ~EGLSurfaceStore() noexcept;
57 
58  operator EGLSurface() const;
59 
60 private:
61  EGLSurfaceStore(EGLSurfaceStore const&) = delete;
62  EGLSurfaceStore& operator=(EGLSurfaceStore const&) = delete;
63 
64  EGLDisplay egl_display_;
65  EGLSurface egl_surface_;
66 };
67 
68 }
69 }
70 
71 #endif /* MIR_GRAPHICS_EGL_RESOURCES_H_ */
All things Mir.
Definition: atomic_callback.h:25
EGLContextStore(EGLDisplay egl_display, EGLContext egl_context)
Definition: egl_resources.cpp:31
AllowNoSurface
Definition: egl_resources.h:50
Definition: egl_resources.h:29
~EGLContextStore() noexcept
Definition: egl_resources.cpp:38
Definition: egl_resources.h:47

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