Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::egl::WindowSurface Class Reference

#include <window_surface.h>

Inheritance diagram for flutter::egl::WindowSurface:
flutter::egl::Surface flutter::testing::egl::MockWindowSurface

Public Member Functions

 WindowSurface (EGLDisplay display, EGLContext context, EGLSurface surface, size_t width, size_t height)
 
virtual bool SetVSyncEnabled (bool enabled)
 
virtual size_t width () const
 
virtual size_t height () const
 
virtual bool vsync_enabled () const
 
- Public Member Functions inherited from flutter::egl::Surface
 Surface (EGLDisplay display, EGLContext context, EGLSurface surface)
 
virtual ~Surface ()
 
virtual bool Destroy ()
 
virtual bool IsValid () const
 
virtual bool IsCurrent () const
 
virtual bool MakeCurrent () const
 
virtual bool SwapBuffers () const
 
virtual const EGLSurface & GetHandle () const
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::egl::Surface
 FML_DISALLOW_COPY_AND_ASSIGN (Surface)
 
- Protected Attributes inherited from flutter::egl::Surface
bool is_valid_ = true
 
EGLDisplay display_ = EGL_NO_DISPLAY
 
EGLContext context_ = EGL_NO_CONTEXT
 
EGLSurface surface_ = EGL_NO_SURFACE
 

Detailed Description

Definition at line 19 of file window_surface.h.

Constructor & Destructor Documentation

◆ WindowSurface()

WindowSurface::WindowSurface ( EGLDisplay  display,
EGLContext  context,
EGLSurface  surface,
size_t  width,
size_t  height 
)

Definition at line 13 of file window_surface.cc.

18 : Surface(display, context, surface), width_(width), height_(height) {}
Surface(EGLDisplay display, EGLContext context, EGLSurface surface)
Definition: surface.cc:12
virtual size_t height() const
virtual size_t width() const
VkSurfaceKHR surface
Definition: main.cc:49

Member Function Documentation

◆ height()

size_t WindowSurface::height ( ) const
virtual

Definition at line 36 of file window_surface.cc.

36 {
37 return height_;
38}

◆ SetVSyncEnabled()

bool WindowSurface::SetVSyncEnabled ( bool  enabled)
virtual

Definition at line 20 of file window_surface.cc.

20 {
22
23 if (::eglSwapInterval(display_, enabled ? 1 : 0) != EGL_TRUE) {
25 return false;
26 }
27
28 vsync_enabled_ = enabled;
29 return true;
30}
EGLDisplay display_
Definition: surface.h:50
virtual bool IsCurrent() const
Definition: surface.cc:43
#define FML_DCHECK(condition)
Definition: logging.h:103
#define WINDOWS_LOG_EGL_ERROR
Definition: egl.h:19

◆ vsync_enabled()

bool WindowSurface::vsync_enabled ( ) const
virtual

Definition at line 40 of file window_surface.cc.

40 {
41 return vsync_enabled_;
42}

◆ width()

size_t WindowSurface::width ( ) const
virtual

Definition at line 32 of file window_surface.cc.

32 {
33 return width_;
34}

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