| Flutter Windows Embedder |

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

`#include <window_surface.h>`

Inheritance diagram for flutter::egl::WindowSurface:

## 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()

flutter::egl::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) {}
flutter::egl::Surface::Surface
Surface(EGLDisplay display, EGLContext context, EGLSurface surface)
Definition: surface.cc:12
flutter::egl::WindowSurface::width
virtual size_t width() const
Definition: window_surface.cc:32
flutter::egl::WindowSurface::height
virtual size_t height() const
Definition: window_surface.cc:36

## Member Function Documentation

## ◆ height()

size_t flutter::egl::WindowSurface::height | ( |  | ) | const
| virtual

Definition at line 36 of file window_surface.cc.

36 {
37 return height_;
38 }

## ◆ SetVSyncEnabled()

bool flutter::egl::WindowSurface::SetVSyncEnabled | ( | bool | enabled | ) |
| virtual

Definition at line 20 of file window_surface.cc.

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

References flutter::egl::Surface::display_, flutter::egl::Surface::IsCurrent(), and WINDOWS_LOG_EGL_ERROR.

## ◆ vsync_enabled()

bool flutter::egl::WindowSurface::vsync_enabled | ( |  | ) | const
| virtual

Definition at line 40 of file window_surface.cc.

40 {
41 return vsync_enabled_;
42 }

## ◆ width()

size_t flutter::egl::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:

- shell/platform/windows/egl/window_surface.h
- shell/platform/windows/egl/window_surface.cc