Kanzi 3.9.10
kanzi::EGLPixmapSurface Class Reference

Class representing EGL pixmap surface. More...

#include <kanzi/core.ui/platform/context_api/egl/egl_pixmap_surface.hpp>

Public Member Functions

bool destroy (const EGLDisplay &eglDisplay)
 Destroys EGL pixmap surface.
 
 EGLPixmapSurface (::EGLSurface eglSurface)
 Constructor.
 
 EGLPixmapSurface (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig, EGLNativePixmapType eglNativePixmap)
 Constructor.
 
KZ_NO_DISCARD::EGLSurface getNativeHandle () const noexcept
 Gets EGL pixmap surface handle.
 
bool swapBuffers (const EGLDisplay &eglDisplay) const
 Posts rendering results.
 

Static Public Member Functions

static KZ_NO_DISCARD ::EGLSurface getNoSurface () noexcept
 Gets a no surface EGL surface handle.
 
static KZ_NO_DISCARD optional< EGLPixmapSurfacetryCreate (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig, EGLNativePixmapType eglNativePixmap, const EGLint *surfaceAttributes) noexcept
 Creates an EGL pixmap surface.
 

Detailed Description

Class representing EGL pixmap surface.

Since
Kanzi 3.9.10

Constructor & Destructor Documentation

◆ EGLPixmapSurface() [1/2]

kanzi::EGLPixmapSurface::EGLPixmapSurface ( const EGLDisplay & eglDisplay,
const EGLConfig & eglConfig,
EGLNativePixmapType eglNativePixmap )
explicit

Constructor.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
eglNativePixmapPixmap to attach this surface to.
Postcondition
isNoSurface() returns false for this object.
egl::getError() returns EGL_SUCCESS.

◆ EGLPixmapSurface() [2/2]

kanzi::EGLPixmapSurface::EGLPixmapSurface ( ::EGLSurface eglSurface)
explicit

Constructor.

Parameters
eglSurfaceEGL pixmap surface handle.
Postcondition
egl::getError() returns EGL_SUCCESS.

Member Function Documentation

◆ getNoSurface()

static KZ_NO_DISCARD ::EGLSurface kanzi::EGLPixmapSurface::getNoSurface ( )
staticnoexcept

Gets a no surface EGL surface handle.

Returns
EGL surface handle with a value representing no surface.

◆ tryCreate()

static KZ_NO_DISCARD optional< EGLPixmapSurface > kanzi::EGLPixmapSurface::tryCreate ( const EGLDisplay & eglDisplay,
const EGLConfig & eglConfig,
EGLNativePixmapType eglNativePixmap,
const EGLint * surfaceAttributes )
staticnoexcept

Creates an EGL pixmap surface.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
eglNativePixmapPixmap to attach this surface to.
surfaceAttributesArray of extra attributes.
Return values
nulloptSurface creation failed.
Returns
The created EGL pixmap surface.

◆ destroy()

bool kanzi::EGLPixmapSurface::destroy ( const EGLDisplay & eglDisplay)

Destroys EGL pixmap surface.

Call this before destroying the object.

Parameters
eglDisplayEGL display connection.
Postcondition
egl::getError() returns EGL_SUCCESS.

◆ swapBuffers()

bool kanzi::EGLPixmapSurface::swapBuffers ( const EGLDisplay & eglDisplay) const

Posts rendering results.

Implicitly flushes the rendering pipeline and executes all received rendering commands before posting.

Parameters
eglDisplayEGL display connection.
See also
swapInterval().
Returns
True on success, false on failure.
Postcondition
egl::getError() returns EGL_SUCCESS.

◆ getNativeHandle()

KZ_NO_DISCARD::EGLSurface kanzi::EGLPixmapSurface::getNativeHandle ( ) const
noexcept

Gets EGL pixmap surface handle.

Returns
EGL pixmap surface handle.

The documentation for this class was generated from the following file: