Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::egl::Surface Class Reference

#include <surface.h>

Public Member Functions

 Surface (EGLDisplay display, EGLSurface surface)
 
 ~Surface ()
 
bool IsValid () const
 
const EGLSurface & GetHandle () const
 
bool Present () const
 

Detailed Description

Definition at line 14 of file surface.h.

Constructor & Destructor Documentation

◆ Surface()

Surface::Surface ( EGLDisplay  display,
EGLSurface  surface 
)

Definition at line 10 of file surface.cc.

11 : display_(display), surface_(surface) {}
VkSurfaceKHR surface
Definition main.cc:49

◆ ~Surface()

Surface::~Surface ( )

Definition at line 13 of file surface.cc.

13 {
14 if (surface_ != EGL_NO_SURFACE) {
15 if (::eglDestroySurface(display_, surface_) != EGL_TRUE) {
17 }
18 }
19}
#define IMPELLER_LOG_EGL_ERROR
Definition egl.h:19

Member Function Documentation

◆ GetHandle()

const EGLSurface & Surface::GetHandle ( ) const

Definition at line 21 of file surface.cc.

21 {
22 return surface_;
23}

◆ IsValid()

bool Surface::IsValid ( ) const

Definition at line 25 of file surface.cc.

25 {
26 return surface_ != EGL_NO_SURFACE;
27}

◆ Present()

bool Surface::Present ( ) const

Definition at line 29 of file surface.cc.

29 {
30 const auto result = ::eglSwapBuffers(display_, surface_) == EGL_TRUE;
31 if (!result) {
33 }
34 return result;
35}
GAsyncResult * result

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