Flutter Engine
Loading...
Searching...
No Matches
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
surface
VkSurfaceKHR surface
Definition
main.cc:65
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:25
surface.h
impeller
Definition
texture.h:16
impeller
toolkit
egl
surface.cc
Generated on Thu Nov 6 2025 16:11:21 for Flutter Engine by
1.9.8