5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_TEST_MOCK_GLES_H_
33 static std::shared_ptr<MockGLES>
Init(
34 const std::optional<std::vector<const unsigned char*>>&
extensions =
36 const char* version_string =
"OpenGL ES 3.0",
46 std::vector<std::string> calls = captured_calls_;
47 captured_calls_.clear();
58 void RecordCall(
const char*
name) { captured_calls_.emplace_back(
name); }
61 std::vector<std::string> captured_calls_;
63 MockGLES(
const MockGLES&) =
delete;
65 MockGLES& operator=(
const MockGLES&) =
delete;
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.
friend void RecordGLCall(const char *name)
std::vector< std::string > GetCapturedCalls()
Returns a vector of the names of all recorded calls.
const ProcTableGLES & GetProcTable() const
Returns a configured |ProcTableGLES| instance.
DEF_SWITCHES_START aot vmservice shared library name
const ProcTableGLES::Resolver kMockResolverGLES