Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
mock_gles.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 <memory>
6
7#include "GLES3/gl3.h"
8#include "fml/logging.h"
11
12namespace impeller {
13namespace testing {
14
15// OpenGLES is not thread safe.
16//
17// This mutex is used to ensure that only one test is using the mock at a time.
18static std::mutex g_test_lock;
19
20static std::weak_ptr<MockGLES> g_mock_gles;
21
22static std::vector<const char*> g_extensions;
23
24static const char* g_version;
25static std::string g_extensions_string;
26
27template <typename T, typename U>
28struct CheckSameSignature : std::false_type {};
29
30template <typename Ret, typename... Args>
31struct CheckSameSignature<Ret(Args...), Ret(Args...)> : std::true_type {};
32
33// This is a stub function that does nothing/records nothing.
34void doNothing() {}
35
36auto const kMockVendor = "MockGLES";
37const auto kMockShadingLanguageVersion = "GLSL ES 1.0";
38auto const kExtensions = std::vector<const char*>{
39 "GL_KHR_debug" //
40};
41
42namespace {
43
44template <typename T>
45struct function_traits;
46
47template <typename C, typename Ret, typename... Args>
48struct function_traits<Ret (C::*)(Args...)> {
49 using return_type = Ret;
50};
51
52template <typename Func, typename... Args>
53auto CallMockMethod(Func func, Args&&... args) {
54 if (auto mock_gles = g_mock_gles.lock()) {
55 if (mock_gles->GetImpl()) {
56 return (mock_gles->GetImpl()->*func)(std::forward<Args>(args)...);
57 }
58 }
59 return typename function_traits<Func>::return_type();
60}
61} // namespace
62
63const unsigned char* mockGetString(GLenum name) {
64 switch (name) {
65 case GL_VENDOR:
66 return reinterpret_cast<const unsigned char*>(kMockVendor);
67 case GL_VERSION:
68 return reinterpret_cast<const unsigned char*>(g_version);
69 case GL_EXTENSIONS:
70 return reinterpret_cast<const unsigned char*>(
71 g_extensions_string.c_str());
72 case GL_SHADING_LANGUAGE_VERSION:
73 return reinterpret_cast<const unsigned char*>(
75 default:
76 return reinterpret_cast<const unsigned char*>("");
77 }
78}
79
80static_assert(CheckSameSignature<decltype(mockGetString), //
81 decltype(glGetString)>::value);
82
83const unsigned char* mockGetStringi(GLenum name, GLuint index) {
84 switch (name) {
85 case GL_EXTENSIONS:
86 return reinterpret_cast<const unsigned char*>(g_extensions[index]);
87 default:
88 return reinterpret_cast<const unsigned char*>("");
89 }
90}
91
92static_assert(CheckSameSignature<decltype(mockGetStringi), //
93 decltype(glGetStringi)>::value);
94
95void mockGetIntegerv(GLenum name, int* value) {
96 switch (name) {
97 case GL_NUM_EXTENSIONS: {
98 *value = g_extensions.size();
99 } break;
100 case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
101 *value = 8;
102 break;
103 case GL_MAX_LABEL_LENGTH_KHR:
104 *value = 64;
105 break;
106 case GL_MAX_TEXTURE_SIZE:
107 *value = 4096;
108 break;
109 default:
110 CallMockMethod(&IMockGLESImpl::GetIntegerv, name, value);
111 break;
112 }
113}
114
115static_assert(CheckSameSignature<decltype(mockGetIntegerv), //
116 decltype(glGetIntegerv)>::value);
117
118GLenum mockGetError() {
119 return GL_NO_ERROR;
120}
121
122static_assert(CheckSameSignature<decltype(mockGetError), //
123 decltype(glGetError)>::value);
124
126
127static_assert(CheckSameSignature<decltype(mockPopDebugGroupKHR), //
128 decltype(glPopDebugGroupKHR)>::value);
129
130void mockPushDebugGroupKHR(GLenum source,
131 GLuint id,
132 GLsizei length,
133 const GLchar* message) {}
134
135static_assert(CheckSameSignature<decltype(mockPushDebugGroupKHR), //
136 decltype(glPushDebugGroupKHR)>::value);
137
138void mockGenQueriesEXT(GLsizei n, GLuint* ids) {
139 CallMockMethod(&IMockGLESImpl::GenQueriesEXT, n, ids);
140}
141
142static_assert(CheckSameSignature<decltype(mockGenQueriesEXT), //
143 decltype(glGenQueriesEXT)>::value);
144
145void mockBeginQueryEXT(GLenum target, GLuint id) {
146 CallMockMethod(&IMockGLESImpl::BeginQueryEXT, target, id);
147}
148
149static_assert(CheckSameSignature<decltype(mockBeginQueryEXT), //
150 decltype(glBeginQueryEXT)>::value);
151
152void mockEndQueryEXT(GLuint id) {
153 CallMockMethod(&IMockGLESImpl::EndQueryEXT, id);
154}
155
156static_assert(CheckSameSignature<decltype(mockEndQueryEXT), //
157 decltype(glEndQueryEXT)>::value);
158
159void mockGetQueryObjectuivEXT(GLuint id, GLenum target, GLuint* result) {
160 CallMockMethod(&IMockGLESImpl::GetQueryObjectuivEXT, id, target, result);
161}
162
163static_assert(CheckSameSignature<decltype(mockGetQueryObjectuivEXT), //
164 decltype(glGetQueryObjectuivEXT)>::value);
165
166void mockGetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64* result) {
167 CallMockMethod(&IMockGLESImpl::GetQueryObjectui64vEXT, id, target, result);
168}
169
170static_assert(CheckSameSignature<decltype(mockGetQueryObjectui64vEXT), //
171 decltype(glGetQueryObjectui64vEXT)>::value);
172
173void mockDeleteQueriesEXT(GLsizei size, const GLuint* queries) {
174 CallMockMethod(&IMockGLESImpl::DeleteQueriesEXT, size, queries);
175}
176
177void mockDeleteTextures(GLsizei size, const GLuint* queries) {
178 CallMockMethod(&IMockGLESImpl::DeleteTextures, size, queries);
179}
180
181static_assert(CheckSameSignature<decltype(mockDeleteQueriesEXT), //
182 decltype(glDeleteQueriesEXT)>::value);
183
184void mockUniform1fv(GLint location, GLsizei count, const GLfloat* value) {
185 CallMockMethod(&IMockGLESImpl::Uniform1fv, location, count, value);
186}
187// Uniform1fv is already here, adding others
188void mockUniform2fv(GLint location, GLsizei count, const GLfloat* value) {
189 CallMockMethod(&IMockGLESImpl::Uniform2fv, location, count, value);
190}
191static_assert(CheckSameSignature<decltype(mockUniform2fv), //
192 decltype(glUniform2fv)>::value);
193
194void mockUniform3fv(GLint location, GLsizei count, const GLfloat* value) {
195 CallMockMethod(&IMockGLESImpl::Uniform3fv, location, count, value);
196}
197static_assert(CheckSameSignature<decltype(mockUniform3fv), //
198 decltype(glUniform3fv)>::value);
199
200void mockUniform4fv(GLint location, GLsizei count, const GLfloat* value) {
201 CallMockMethod(&IMockGLESImpl::Uniform4fv, location, count, value);
202}
203static_assert(CheckSameSignature<decltype(mockUniform4fv), //
204 decltype(glUniform4fv)>::value);
205
207 GLsizei count,
208 GLboolean transpose,
209 const GLfloat* value) {
210 CallMockMethod(&IMockGLESImpl::UniformMatrix2fv, location, count, transpose,
211 value);
212}
213static_assert(CheckSameSignature<decltype(mockUniformMatrix2fv), //
214 decltype(glUniformMatrix2fv)>::value);
215
217 GLsizei count,
218 GLboolean transpose,
219 const GLfloat* value) {
220 CallMockMethod(&IMockGLESImpl::UniformMatrix3fv, location, count, transpose,
221 value);
222}
223static_assert(CheckSameSignature<decltype(mockUniformMatrix3fv), //
224 decltype(glUniformMatrix3fv)>::value);
225
227 GLsizei count,
228 GLboolean transpose,
229 const GLfloat* value) {
230 CallMockMethod(&IMockGLESImpl::UniformMatrix4fv, location, count, transpose,
231 value);
232}
233static_assert(CheckSameSignature<decltype(mockUniformMatrix4fv), //
234 decltype(glUniformMatrix4fv)>::value);
235
236void mockGenTextures(GLsizei n, GLuint* textures) {
237 CallMockMethod(&IMockGLESImpl::GenTextures, n, textures);
238}
239
240static_assert(CheckSameSignature<decltype(mockGenTextures), //
241 decltype(glGenTextures)>::value);
242
243void mockGenBuffers(GLsizei n, GLuint* buffers) {
244 CallMockMethod(&IMockGLESImpl::GenBuffers, n, buffers);
245}
246
247static_assert(CheckSameSignature<decltype(mockGenTextures), //
248 decltype(glGenTextures)>::value);
249
250void mockObjectLabelKHR(GLenum identifier,
251 GLuint name,
252 GLsizei length,
253 const GLchar* label) {
254 CallMockMethod(&IMockGLESImpl::ObjectLabelKHR, identifier, name, length,
255 label);
256}
257static_assert(CheckSameSignature<decltype(mockObjectLabelKHR), //
258 decltype(glObjectLabelKHR)>::value);
259
261 GLint level,
262 GLint xoffset,
263 GLint yoffset,
264 GLsizei width,
265 GLsizei height,
266 GLenum format,
267 GLenum type,
268 const void* pixels) {
269 CallMockMethod(&IMockGLESImpl::TexSubImage2D, target, level, xoffset, yoffset,
270 width, height, format, type, pixels);
271}
272static_assert(CheckSameSignature<decltype(mockTexSubImage2D), //
273 decltype(glTexSubImage2D)>::value);
274
276 GLint level,
277 GLint internalformat,
278 GLsizei width,
279 GLsizei height,
280 GLint border,
281 GLenum format,
282 GLenum type,
283 const void* pixels) {
284 CallMockMethod(&IMockGLESImpl::TexImage2D, target, level, internalformat,
285 width, height, border, format, type, pixels);
286}
287static_assert(CheckSameSignature<decltype(mockTexImage2D), //
288 decltype(glTexImage2D)>::value);
289
290void mockBindTexture(GLenum target, GLuint texture) {
291 CallMockMethod(&IMockGLESImpl::BindTexture, target, texture);
292}
293static_assert(CheckSameSignature<decltype(mockBindTexture), //
294 decltype(glBindTexture)>::value);
295
296GLboolean mockIsTexture(GLuint texture) {
297 return CallMockMethod(&IMockGLESImpl::IsTexture, texture);
298}
299
300static_assert(CheckSameSignature<decltype(mockIsTexture), //
301 decltype(glIsTexture)>::value);
302
304 return CallMockMethod(&IMockGLESImpl::CheckFramebufferStatus, target);
305}
306
307static_assert(CheckSameSignature<decltype(mockCheckFramebufferStatus), //
308 decltype(glCheckFramebufferStatus)>::value);
309
310void mockGenFramebuffers(GLsizei n, GLuint* ids) {
311 return CallMockMethod(&IMockGLESImpl::GenFramebuffers, n, ids);
312}
313
314static_assert(CheckSameSignature<decltype(mockGenFramebuffers), //
315 decltype(glGenFramebuffers)>::value);
316
317void mockBindFramebuffer(GLenum target, GLuint framebuffer) {
318 return CallMockMethod(&IMockGLESImpl::BindFramebuffer, target, framebuffer);
319}
320
321static_assert(CheckSameSignature<decltype(mockBindFramebuffer), //
322 decltype(glBindFramebuffer)>::value);
323
324void mockReadPixels(GLint x,
325 GLint y,
326 GLsizei width,
327 GLsizei height,
328 GLenum format,
329 GLenum type,
330 void* data) {
331 return CallMockMethod(&IMockGLESImpl::ReadPixels, x, y, width, height, format,
332 type, data);
333}
334
336 GLsizei numAttachments,
337 const GLenum* attachments) {
338 return CallMockMethod(&IMockGLESImpl::DiscardFramebufferEXT, target,
339 numAttachments, attachments);
340}
341
342void mockViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
343 return CallMockMethod(&IMockGLESImpl::Viewport, x, y, width, height);
344}
345
346static_assert(CheckSameSignature<decltype(mockDiscardFramebufferEXT), //
347 decltype(glDiscardFramebufferEXT)>::value);
348
350 GLsizei numAttachments,
351 const GLenum* attachments) {
352 return CallMockMethod(&IMockGLESImpl::InvalidateFramebuffer, target,
353 numAttachments, attachments);
354}
355
356static_assert(CheckSameSignature<decltype(mockInvalidateFramebuffer), //
357 decltype(glInvalidateFramebuffer)>::value);
358
359// static
360std::shared_ptr<MockGLES> MockGLES::Init(
361 std::unique_ptr<MockGLESImpl> impl,
362 const std::optional<std::vector<const char*>>& extensions,
363 const char* version_string) {
364 FML_CHECK(g_test_lock.try_lock())
365 << "MockGLES is already being used by another test.";
366 g_extensions = extensions.value_or(kExtensions);
367 g_extensions_string.clear();
368 for (const auto& ext : g_extensions) {
369 if (!g_extensions_string.empty()) {
370 g_extensions_string += " ";
371 }
372 g_extensions_string += ext;
373 }
374 g_version = version_string;
375 auto mock_gles = std::shared_ptr<MockGLES>(new MockGLES());
376 mock_gles->impl_ = std::move(impl);
377 g_mock_gles = mock_gles;
378 return mock_gles;
379}
380
381std::shared_ptr<MockGLES> MockGLES::Init(
382 const std::optional<std::vector<const char*>>& extensions,
383 const char* version_string,
384 ProcTableGLES::Resolver resolver) {
385 // If we cannot obtain a lock, MockGLES is already being used elsewhere.
386 FML_CHECK(g_test_lock.try_lock())
387 << "MockGLES is already being used by another test.";
388 g_extensions = extensions.value_or(kExtensions);
389 g_extensions_string.clear();
390 for (const auto& ext : g_extensions) {
391 if (!g_extensions_string.empty()) {
392 g_extensions_string += " ";
393 }
394 g_extensions_string += ext;
395 }
396 g_version = version_string;
397 auto mock_gles = std::shared_ptr<MockGLES>(new MockGLES(std::move(resolver)));
398 g_mock_gles = mock_gles;
399 return mock_gles;
400}
401
403 if (strcmp(name, "glPopDebugGroupKHR") == 0) {
404 return reinterpret_cast<void*>(&mockPopDebugGroupKHR);
405 } else if (strcmp(name, "glPushDebugGroupKHR") == 0) {
406 return reinterpret_cast<void*>(&mockPushDebugGroupKHR);
407 } else if (strcmp(name, "glGetString") == 0) {
408 return reinterpret_cast<void*>(&mockGetString);
409 } else if (strcmp(name, "glGetStringi") == 0) {
410 return reinterpret_cast<void*>(&mockGetStringi);
411 } else if (strcmp(name, "glGetIntegerv") == 0) {
412 return reinterpret_cast<void*>(&mockGetIntegerv);
413 } else if (strcmp(name, "glGetError") == 0) {
414 return reinterpret_cast<void*>(&mockGetError);
415 } else if (strcmp(name, "glGenQueriesEXT") == 0) {
416 return reinterpret_cast<void*>(&mockGenQueriesEXT);
417 } else if (strcmp(name, "glBeginQueryEXT") == 0) {
418 return reinterpret_cast<void*>(&mockBeginQueryEXT);
419 } else if (strcmp(name, "glEndQueryEXT") == 0) {
420 return reinterpret_cast<void*>(&mockEndQueryEXT);
421 } else if (strcmp(name, "glDeleteQueriesEXT") == 0) {
422 return reinterpret_cast<void*>(&mockDeleteQueriesEXT);
423 } else if (strcmp(name, "glDeleteTextures") == 0) {
424 return reinterpret_cast<void*>(&mockDeleteTextures);
425 } else if (strcmp(name, "glGetQueryObjectui64vEXT") == 0) {
426 return reinterpret_cast<void*>(mockGetQueryObjectui64vEXT);
427 } else if (strcmp(name, "glGetQueryObjectuivEXT") == 0) {
428 return reinterpret_cast<void*>(mockGetQueryObjectuivEXT);
429 } else if (strcmp(name, "glUniform1fv") == 0) {
430 return reinterpret_cast<void*>(mockUniform1fv);
431 } else if (strcmp(name, "glUniform2fv") == 0) {
432 return reinterpret_cast<void*>(mockUniform2fv);
433 } else if (strcmp(name, "glUniform3fv") == 0) {
434 return reinterpret_cast<void*>(mockUniform3fv);
435 } else if (strcmp(name, "glUniform4fv") == 0) {
436 return reinterpret_cast<void*>(mockUniform4fv);
437 } else if (strcmp(name, "glUniformMatrix2fv") == 0) {
438 return reinterpret_cast<void*>(mockUniformMatrix2fv);
439 } else if (strcmp(name, "glUniformMatrix3fv") == 0) {
440 return reinterpret_cast<void*>(mockUniformMatrix3fv);
441 } else if (strcmp(name, "glUniformMatrix4fv") == 0) {
442 return reinterpret_cast<void*>(mockUniformMatrix4fv);
443 } else if (strcmp(name, "glGenTextures") == 0) {
444 return reinterpret_cast<void*>(mockGenTextures);
445 } else if (strcmp(name, "glTexSubImage2D") == 0) {
446 return reinterpret_cast<void*>(mockTexSubImage2D);
447 } else if (strcmp(name, "glTexImage2D") == 0) {
448 return reinterpret_cast<void*>(mockTexImage2D);
449 } else if (strcmp(name, "glBindTexture") == 0) {
450 return reinterpret_cast<void*>(mockBindTexture);
451 } else if (strcmp(name, "glObjectLabelKHR") == 0) {
452 return reinterpret_cast<void*>(mockObjectLabelKHR);
453 } else if (strcmp(name, "glGenBuffers") == 0) {
454 return reinterpret_cast<void*>(mockGenBuffers);
455 } else if (strcmp(name, "glIsTexture") == 0) {
456 return reinterpret_cast<void*>(mockIsTexture);
457 } else if (strcmp(name, "glCheckFramebufferStatus") == 0) {
458 return reinterpret_cast<void*>(mockCheckFramebufferStatus);
459 } else if (strcmp(name, "glReadPixels") == 0) {
460 return reinterpret_cast<void*>(mockReadPixels);
461 } else if (strcmp(name, "glGenFramebuffers") == 0) {
462 return reinterpret_cast<void*>(mockGenFramebuffers);
463 } else if (strcmp(name, "glBindFramebuffer") == 0) {
464 return reinterpret_cast<void*>(mockBindFramebuffer);
465 } else if (strcmp(name, "glDiscardFramebufferEXT") == 0) {
466 return reinterpret_cast<void*>(mockDiscardFramebufferEXT);
467 } else if (strcmp(name, "glInvalidateFramebuffer") == 0) {
468 return reinterpret_cast<void*>(mockInvalidateFramebuffer);
469 } else if (strcmp(name, "glViewport") == 0) {
470 return reinterpret_cast<void*>(mockViewport);
471 } else {
472 return reinterpret_cast<void*>(&doNothing);
473 }
474};
475
476MockGLES::MockGLES(ProcTableGLES::Resolver resolver)
477 : proc_table_(std::move(resolver)) {}
478
479MockGLES::~MockGLES() {
480 g_test_lock.unlock();
481}
482
483} // namespace testing
484} // namespace impeller
std::function< void *(const char *function_name)> Resolver
virtual void GenFramebuffers(GLsizei n, GLuint *framebuffers)
Definition mock_gles.h:43
virtual void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
Definition mock_gles.h:34
virtual void InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
Definition mock_gles.h:99
virtual void Uniform2fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.h:67
virtual void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.h:81
virtual void GenBuffers(GLsizei n, GLuint *buffers)
Definition mock_gles.h:93
virtual void GetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64 *result)
Definition mock_gles.h:89
virtual void GetQueryObjectuivEXT(GLuint id, GLenum target, GLuint *result)
Definition mock_gles.h:88
virtual void DeleteQueriesEXT(GLsizei size, const GLuint *queries)
Definition mock_gles.h:92
virtual void ObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
Definition mock_gles.h:61
virtual void BindTexture(GLenum target, GLuint texture)
Definition mock_gles.h:24
virtual void EndQueryEXT(GLuint id)
Definition mock_gles.h:87
virtual void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.h:77
virtual void DiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments)
Definition mock_gles.h:96
virtual void DeleteTextures(GLsizei size, const GLuint *queries)
Definition mock_gles.h:22
virtual void GenQueriesEXT(GLsizei n, GLuint *ids)
Definition mock_gles.h:85
virtual void Uniform4fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.h:71
virtual void BeginQueryEXT(GLenum target, GLuint id)
Definition mock_gles.h:86
virtual void BindFramebuffer(GLenum target, GLuint framebuffer)
Definition mock_gles.h:44
virtual void GetIntegerv(GLenum name, GLint *attachments)
Definition mock_gles.h:102
virtual void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
Definition mock_gles.h:25
virtual GLboolean IsTexture(GLuint texture)
Definition mock_gles.h:95
virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
Definition mock_gles.h:103
virtual void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
Definition mock_gles.h:53
virtual void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.h:73
virtual void Uniform1fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.h:65
virtual void Uniform3fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.h:69
virtual void GenTextures(GLsizei n, GLuint *textures)
Definition mock_gles.h:23
virtual GLenum CheckFramebufferStatus(GLenum target)
Definition mock_gles.h:50
Provides a mocked version of the |ProcTableGLES| class.
Definition mock_gles.h:259
static std::shared_ptr< MockGLES > Init(std::unique_ptr< MockGLESImpl > impl, const std::optional< std::vector< const char * > > &extensions=std::nullopt, const char *version_string="OpenGL ES 3.0")
Definition mock_gles.cc:360
uint32_t location
int32_t value
int32_t x
const char * message
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
uint32_t * target
#define FML_CHECK(condition)
Definition logging.h:104
size_t length
FlTexture * texture
double y
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switch_defs.h:36
void mockDeleteQueriesEXT(GLsizei size, const GLuint *queries)
Definition mock_gles.cc:173
void mockGetQueryObjectuivEXT(GLuint id, GLenum target, GLuint *result)
Definition mock_gles.cc:159
static std::mutex g_test_lock
Definition mock_gles.cc:18
GLenum mockGetError()
Definition mock_gles.cc:118
void mockDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments)
Definition mock_gles.cc:335
const auto kMockShadingLanguageVersion
Definition mock_gles.cc:37
void mockPopDebugGroupKHR()
Definition mock_gles.cc:125
const unsigned char * mockGetStringi(GLenum name, GLuint index)
Definition mock_gles.cc:83
void mockUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.cc:216
void mockGetIntegerv(GLenum name, int *value)
Definition mock_gles.cc:95
static std::vector< const char * > g_extensions
Definition mock_gles.cc:22
void mockGetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64 *result)
Definition mock_gles.cc:166
GLboolean mockIsTexture(GLuint texture)
Definition mock_gles.cc:296
auto const kExtensions
Definition mock_gles.cc:38
static std::string g_extensions_string
Definition mock_gles.cc:25
void mockReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *data)
Definition mock_gles.cc:324
void mockUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.cc:226
void mockTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
Definition mock_gles.cc:275
static std::weak_ptr< MockGLES > g_mock_gles
Definition mock_gles.cc:20
void mockUniform4fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.cc:200
void mockTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
Definition mock_gles.cc:260
void mockDeleteTextures(GLsizei size, const GLuint *queries)
Definition mock_gles.cc:177
void mockUniform2fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.cc:188
GLenum mockCheckFramebufferStatus(GLenum target)
Definition mock_gles.cc:303
void mockUniform1fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.cc:184
void mockObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
Definition mock_gles.cc:250
auto const kMockVendor
Definition mock_gles.cc:36
void mockBindTexture(GLenum target, GLuint texture)
Definition mock_gles.cc:290
static const char * g_version
Definition mock_gles.cc:24
const ProcTableGLES::Resolver kMockResolverGLES
Definition mock_gles.cc:402
void mockUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Definition mock_gles.cc:206
void mockPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar *message)
Definition mock_gles.cc:130
void mockUniform3fv(GLint location, GLsizei count, const GLfloat *value)
Definition mock_gles.cc:194
void mockBindFramebuffer(GLenum target, GLuint framebuffer)
Definition mock_gles.cc:317
void mockEndQueryEXT(GLuint id)
Definition mock_gles.cc:152
void mockGenBuffers(GLsizei n, GLuint *buffers)
Definition mock_gles.cc:243
void mockInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
Definition mock_gles.cc:349
void mockGenFramebuffers(GLsizei n, GLuint *ids)
Definition mock_gles.cc:310
void mockGenQueriesEXT(GLsizei n, GLuint *ids)
Definition mock_gles.cc:138
const unsigned char * mockGetString(GLenum name)
Definition mock_gles.cc:63
void mockBeginQueryEXT(GLenum target, GLuint id)
Definition mock_gles.cc:145
void mockViewport(GLint x, GLint y, GLsizei width, GLsizei height)
Definition mock_gles.cc:342
void mockGenTextures(GLsizei n, GLuint *textures)
Definition mock_gles.cc:236
Definition ref_ptr.h:261
impeller::ShaderType type
int32_t height
int32_t width