5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
11#include "gmock/gmock.h"
33 const void* pixels) {}
42 return GL_FRAMEBUFFER_COMPLETE;
55 const GLchar* label) {}
56 virtual void Uniform1fv(GLint location, GLsizei count,
const GLfloat* value) {
70 GLsizei numAttachments,
71 const GLenum* attachments) {};
79 (GLsizei
size,
const GLuint* queries),
97 (GLsizei n, GLuint* framebuffers),
101 (GLenum
target, GLuint framebuffer),
124 (GLsizei n,
const GLuint* framebuffers),
129 (GLenum identifier, GLuint
name, GLsizei
length,
const GLchar* label),
133 (GLint location, GLsizei count,
const GLfloat* value),
140 (GLuint
id, GLenum
target, GLuint* result),
144 (GLuint
id, GLenum
target, GLuint64* result),
148 (GLsizei
size,
const GLuint* queries),
153 (GLsizei n,
const GLuint* buffers),
159 GLsizei numAttachments,
160 const GLenum* attachments),
175 static std::shared_ptr<MockGLES>
Init(
176 std::unique_ptr<MockGLESImpl> impl,
177 const std::optional<std::vector<const char*>>& extensions = std::nullopt);
184 static std::shared_ptr<MockGLES> Init(
185 const std::optional<std::vector<const char*>>& extensions = std::nullopt,
186 const char* version_string =
"OpenGL ES 3.0",
203 std::unique_ptr<IMockGLESImpl> impl_;
std::function< void *(const char *function_name)> Resolver
virtual void GenFramebuffers(GLsizei n, GLuint *framebuffers)
virtual void GenBuffers(GLsizei n, GLuint *buffers)
virtual void GetQueryObjectui64vEXT(GLuint id, GLenum target, GLuint64 *result)
virtual void GetQueryObjectuivEXT(GLuint id, GLenum target, GLuint *result)
virtual void DeleteQueriesEXT(GLsizei size, const GLuint *queries)
virtual void DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
virtual void ObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
virtual void BindTexture(GLenum target, GLuint texture)
virtual void EndQueryEXT(GLuint id)
virtual ~IMockGLESImpl()=default
virtual void DiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments)
virtual void DeleteTextures(GLsizei size, const GLuint *queries)
virtual void GenQueriesEXT(GLsizei n, GLuint *ids)
virtual void BeginQueryEXT(GLenum target, GLuint id)
virtual void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
virtual void BindFramebuffer(GLenum target, GLuint framebuffer)
virtual void GetIntegerv(GLenum name, GLint *attachments)
virtual void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
virtual GLboolean IsTexture(GLuint texture)
virtual void DeleteBuffers(GLsizei n, const GLuint *buffers)
virtual void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
virtual void Uniform1fv(GLint location, GLsizei count, const GLfloat *value)
virtual void GenTextures(GLsizei n, GLuint *textures)
virtual GLenum CheckFramebufferStatus(GLenum target)
Provides a mocked version of the |ProcTableGLES| class.
friend void RecordGLCall(const char *name)
friend void mockGenTextures(GLsizei n, GLuint *textures)
static std::shared_ptr< MockGLES > Init(std::unique_ptr< MockGLESImpl > impl, const std::optional< std::vector< const char * > > &extensions=std::nullopt)
const ProcTableGLES & GetProcTable() const
Returns a configured |ProcTableGLES| instance.
IMockGLESImpl * GetImpl()
MOCK_METHOD(void, TexImage2D,(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels),(override))
MOCK_METHOD(void, GetQueryObjectuivEXT,(GLuint id, GLenum target, GLuint *result),(override))
MOCK_METHOD(void, GenTextures,(GLsizei n, GLuint *textures),(override))
MOCK_METHOD(void, BeginQueryEXT,(GLenum target, GLuint id),(override))
MOCK_METHOD(void, DeleteBuffers,(GLsizei n, const GLuint *buffers),(override))
MOCK_METHOD(GLboolean, IsTexture,(GLuint texture),(override))
MOCK_METHOD(void, BindTexture,(GLenum target, GLuint texture),(override))
MOCK_METHOD(void, BindFramebuffer,(GLenum target, GLuint framebuffer),(override))
MOCK_METHOD(void, ReadPixels,(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels),(override))
MOCK_METHOD(void, GenFramebuffers,(GLsizei n, GLuint *framebuffers),(override))
MOCK_METHOD(void, EndQueryEXT,(GLuint id),(override))
MOCK_METHOD(GLenum, CheckFramebufferStatus,(GLenum target),(override))
MOCK_METHOD(void, GenBuffers,(GLsizei n, GLuint *buffers),(override))
MOCK_METHOD(void, FramebufferTexture2D,(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level),(override))
MOCK_METHOD(void, GetIntegerv,(GLenum name, GLint *value),(override))
MOCK_METHOD(void, Uniform1fv,(GLint location, GLsizei count, const GLfloat *value),(override))
MOCK_METHOD(void, DiscardFramebufferEXT,(GLenum target, GLsizei numAttachments, const GLenum *attachments),(override))
MOCK_METHOD(void, DeleteTextures,(GLsizei size, const GLuint *queries),(override))
MOCK_METHOD(void, DeleteQueriesEXT,(GLsizei size, const GLuint *queries),(override))
MOCK_METHOD(void, GenQueriesEXT,(GLsizei n, GLuint *ids),(override))
MOCK_METHOD(void, ObjectLabelKHR,(GLenum identifier, GLuint name, GLsizei length, const GLchar *label),(override))
MOCK_METHOD(void, DeleteFramebuffers,(GLsizei n, const GLuint *framebuffers),(override))
MOCK_METHOD(void, GetQueryObjectui64vEXT,(GLuint id, GLenum target, GLuint64 *result),(override))
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
const ProcTableGLES::Resolver kMockResolverGLES