31 mock_gles->RecordCall(
name);
35template <
typename T,
typename U>
38template <
typename Ret,
typename... Args>
47 (
unsigned char*)
"GL_KHR_debug"
56 case GL_SHADING_LANGUAGE_VERSION:
59 return (
unsigned char*)
"";
71 return (
unsigned char*)
"";
76 decltype(glGetStringi)>
::value);
80 case GL_NUM_EXTENSIONS: {
83 case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
93 decltype(glGetIntegerv)>
::value);
107 decltype(glPopDebugGroupKHR)>
::value);
117 decltype(glPushDebugGroupKHR)>
::value);
121 for (
auto i = 0;
i < n;
i++) {
127 decltype(glGenQueriesEXT)>
::value);
134 decltype(glBeginQueryEXT)>
::value);
141 decltype(glEndQueryEXT)>
::value);
149 decltype(glGetQueryObjectuivEXT)>
::value);
157 decltype(glGetQueryObjectui64vEXT)>
::value);
164 decltype(glDeleteQueriesEXT)>
::value);
167 const std::optional<std::vector<const unsigned char*>>&
extensions,
168 const char* version_string,
172 <<
"MockGLES is already being used by another test.";
173 g_version = (
unsigned char*)version_string;
175 auto mock_gles = std::shared_ptr<MockGLES>(
new MockGLES(std::move(resolver)));
181 if (strcmp(
name,
"glPopDebugGroupKHR") == 0) {
183 }
else if (strcmp(
name,
"glPushDebugGroupKHR") == 0) {
185 }
else if (strcmp(
name,
"glGetString") == 0) {
187 }
else if (strcmp(
name,
"glGetStringi") == 0) {
189 }
else if (strcmp(
name,
"glGetIntegerv") == 0) {
191 }
else if (strcmp(
name,
"glGetError") == 0) {
193 }
else if (strcmp(
name,
"glGenQueriesEXT") == 0) {
195 }
else if (strcmp(
name,
"glBeginQueryEXT") == 0) {
197 }
else if (strcmp(
name,
"glEndQueryEXT") == 0) {
199 }
else if (strcmp(
name,
"glDeleteQueriesEXT") == 0) {
201 }
else if (strcmp(
name,
"glGetQueryObjectui64vEXT") == 0) {
203 }
else if (strcmp(
name,
"glGetQueryObjectuivEXT") == 0) {
206 return reinterpret_cast<void*
>(&
doNothing);
211 : proc_table_(
std::move(resolver)) {}
213MockGLES::~MockGLES() {
std::function< void *(const char *function_name)> Resolver
Provides a mocked version of the |ProcTableGLES| class.
static std::shared_ptr< MockGLES > Init(const std::optional< std::vector< const unsigned char * > > &extensions=std::nullopt, const char *version_string="OpenGL ES 3.0", ProcTableGLES::Resolver resolver=kMockResolverGLES)
Returns an initialized |MockGLES| instance.
#define FML_CHECK(condition)
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void mockDeleteQueriesEXT(GLsizei size, const GLuint *queries)
void mockGetQueryObjectuivEXT(GLuint id, GLenum target, GLuint *result)
static std::mutex g_test_lock
const auto kMockShadingLanguageVersion
void mockPopDebugGroupKHR()
const unsigned char * mockGetStringi(GLenum name, GLuint index)
void mockGetIntegerv(GLenum name, int *value)
void mockGetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64 *result)
void RecordGLCall(const char *name)
static std::weak_ptr< MockGLES > g_mock_gles
static ProcTableGLES::Resolver g_resolver
const ProcTableGLES::Resolver kMockResolverGLES
void mockPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar *message)
static std::vector< const unsigned char * > g_extensions
void mockEndQueryEXT(GLuint id)
void mockGenQueriesEXT(GLsizei n, GLuint *ids)
const unsigned char * mockGetString(GLenum name)
void mockBeginQueryEXT(GLenum target, GLuint id)
static const unsigned char * g_version