Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
toolkit
egl
surface.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
impeller/toolkit/egl/surface.h
"
6
7
namespace
impeller
{
8
namespace
egl {
9
10
Surface::Surface
(EGLDisplay display, EGLSurface
surface
)
11
:
display_
(display),
surface_
(
surface
) {}
12
13
Surface::~Surface
() {
14
if
(surface_ != EGL_NO_SURFACE) {
15
if
(::eglDestroySurface(display_, surface_) != EGL_TRUE) {
16
IMPELLER_LOG_EGL_ERROR
;
17
}
18
}
19
}
20
21
const
EGLSurface&
Surface::GetHandle
()
const
{
22
return
surface_;
23
}
24
25
bool
Surface::IsValid
()
const
{
26
return
surface_ != EGL_NO_SURFACE;
27
}
28
29
bool
Surface::Present
()
const
{
30
const
auto
result
= ::eglSwapBuffers(display_, surface_) == EGL_TRUE;
31
if
(!
result
) {
32
IMPELLER_LOG_EGL_ERROR
;
33
}
34
return
result
;
35
}
36
37
}
// namespace egl
38
}
// namespace impeller
impeller::Surface::Surface
Surface()
Definition
surface.cc:11
impeller::egl::Surface::IsValid
bool IsValid() const
Definition
surface.cc:25
impeller::egl::Surface::GetHandle
const EGLSurface & GetHandle() const
Definition
surface.cc:21
impeller::egl::Surface::~Surface
~Surface()
Definition
surface.cc:13
impeller::egl::Surface::Present
bool Present() const
Definition
surface.cc:29
surface
VkSurfaceKHR surface
Definition
main.cc:49
result
GAsyncResult * result
Definition
fl_text_input_plugin.cc:106
display_
EGLDisplay display_
Definition
FlutterEmbedderGLFW.cc:38
surface_
EGLSurface surface_
Definition
FlutterEmbedderGLFW.cc:39
IMPELLER_LOG_EGL_ERROR
#define IMPELLER_LOG_EGL_ERROR
Definition
egl.h:19
surface.h
impeller
Definition
texture.h:18
Generated on Fri Apr 26 2024 06:14:04 for Flutter Engine by
1.9.8