~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to include/server/mir/graphics/surfaceless_egl_context.h

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17
17
 */
18
18
 
19
 
#ifndef MIR_GRAPHICS_OFFSCREEN_SURFACELESS_EGL_CONTEXT_H_
20
 
#define MIR_GRAPHICS_OFFSCREEN_SURFACELESS_EGL_CONTEXT_H_
 
19
#ifndef MIR_GRAPHICS_SURFACELESS_EGL_CONTEXT_H_
 
20
#define MIR_GRAPHICS_SURFACELESS_EGL_CONTEXT_H_
21
21
 
22
22
#include "mir/graphics/egl_resources.h"
 
23
#include "mir/graphics/gl_context.h"
23
24
 
24
25
#include <EGL/egl.h>
25
26
 
27
28
{
28
29
namespace graphics
29
30
{
30
 
namespace offscreen
31
 
{
32
31
 
33
 
class SurfacelessEGLContext
 
32
class SurfacelessEGLContext : public GLContext
34
33
{
35
34
public:
36
35
    SurfacelessEGLContext(EGLDisplay egl_display, EGLContext shared_context);
37
 
    SurfacelessEGLContext(SurfacelessEGLContext&&) = default;
 
36
    SurfacelessEGLContext(EGLDisplay egl_display, EGLint const* attribs, EGLContext shared_context);
 
37
    /* We have to explicitly define this, as GLContext has a deleted copy constructor */
 
38
    SurfacelessEGLContext(SurfacelessEGLContext&& move);
 
39
    virtual ~SurfacelessEGLContext() noexcept;
38
40
 
39
 
    void make_current() const;
40
 
    void release_current() const;
 
41
    void make_current() const override;
 
42
    void release_current() const override;
41
43
 
42
44
    operator EGLContext() const;
43
45
 
54
56
 
55
57
}
56
58
}
57
 
}
58
59
 
59
 
#endif /* MIR_GRAPHICS_OFFSCREEN_SURFACELESS_EGL_SURFACE_H_ */
 
60
#endif /* MIR_GRAPHICS_SURFACELESS_EGL_SURFACE_H_ */