Flutter Engine
Loading...
Searching...
No Matches
egl.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 "
flutter/shell/platform/windows/egl/egl.h
"
6
7
#include <EGL/egl.h>
8
9
#include "
flutter/fml/logging.h
"
10
11
namespace
flutter
{
12
namespace
egl {
13
14
namespace
{
15
16
const
char
*
EGLErrorToString
(EGLint
error
) {
17
switch
(
error
) {
18
case
EGL_SUCCESS:
19
return
"Success"
;
20
case
EGL_NOT_INITIALIZED:
21
return
"Not Initialized"
;
22
case
EGL_BAD_ACCESS:
23
return
"Bad Access"
;
24
case
EGL_BAD_ALLOC:
25
return
"Bad Alloc"
;
26
case
EGL_BAD_ATTRIBUTE:
27
return
"Bad Attribute"
;
28
case
EGL_BAD_CONTEXT:
29
return
"Bad Context"
;
30
case
EGL_BAD_CONFIG:
31
return
"Bad Config"
;
32
case
EGL_BAD_CURRENT_SURFACE:
33
return
"Bad Current Surface"
;
34
case
EGL_BAD_DISPLAY:
35
return
"Bad Display"
;
36
case
EGL_BAD_SURFACE:
37
return
"Bad Surface"
;
38
case
EGL_BAD_MATCH:
39
return
"Bad Match"
;
40
case
EGL_BAD_PARAMETER:
41
return
"Bad Parameter"
;
42
case
EGL_BAD_NATIVE_PIXMAP:
43
return
"Bad Native Pixmap"
;
44
case
EGL_BAD_NATIVE_WINDOW:
45
return
"Bad Native Window"
;
46
case
EGL_CONTEXT_LOST:
47
return
"Context Lost"
;
48
}
49
FML_UNREACHABLE
();
50
return
"Unknown"
;
51
}
52
53
}
// namespace
54
55
void
LogEGLError
(std::string_view
message
) {
56
const
EGLint
error
= ::eglGetError();
57
return
FML_LOG
(ERROR) <<
"EGL Error: "
<<
EGLErrorToString
(
error
) <<
" ("
58
<<
error
<<
") "
<<
message
;
59
}
60
61
void
LogEGLError
(std::string_view file,
int
line) {
62
std::stringstream stream;
63
stream <<
"in "
<< file <<
":"
<< line;
64
LogEGLError
(stream.str());
65
}
66
67
}
// namespace egl
68
}
// namespace flutter
message
G_BEGIN_DECLS GBytes * message
Definition
fl_mock_binary_messenger.h:24
error
const uint8_t uint32_t uint32_t GError ** error
Definition
fl_pixel_buffer_texture_test.cc:40
logging.h
FML_LOG
#define FML_LOG(severity)
Definition
logging.h:101
FML_UNREACHABLE
#define FML_UNREACHABLE()
Definition
logging.h:128
flutter
Definition
asset_manager.cc:10
impeller::egl::LogEGLError
void LogEGLError(const char *file, int line)
Definition
egl.cc:54
impeller::egl::EGLErrorToString
static const char * EGLErrorToString(EGLint error)
Definition
egl.cc:18
egl.h
shell
platform
windows
egl
egl.cc
Generated on Thu Nov 6 2025 16:11:24 for Flutter Engine by
1.9.8