Provides a mocked version of the |ProcTableGLES| class. More...
#include <mock_gles.h>
Public Member Functions | |
| const ProcTableGLES & | GetProcTable () const |
| Returns a configured |ProcTableGLES| instance. | |
| ~MockGLES () | |
| IMockGLESImpl * | GetImpl () |
Static Public Member Functions | |
| static std::shared_ptr< MockGLES > | Init (std::unique_ptr< MockGLESImpl > impl, const std::optional< std::vector< const char * > > &extensions=std::nullopt) |
| static std::shared_ptr< MockGLES > | Init (const std::optional< std::vector< const char * > > &extensions=std::nullopt, const char *version_string="OpenGL ES 3.0", ProcTableGLES::Resolver resolver=kMockResolverGLES) |
| Returns an initialized |MockGLES| instance. | |
Friends | |
| void | RecordGLCall (const char *name) |
| void | mockGenTextures (GLsizei n, GLuint *textures) |
Provides a mocked version of the |ProcTableGLES| class.
Typically, Open GLES at runtime will be provided the host's GLES bindings (as function pointers). This class maintains a set of function pointers that appear to be GLES functions, but are actually just stubs that record invocations.
See README.md for more information.
Definition at line 173 of file mock_gles.h.
| impeller::testing::MockGLES::~MockGLES | ( | ) |
Definition at line 342 of file mock_gles.cc.
References impeller::testing::g_test_lock.
|
inline |
Definition at line 194 of file mock_gles.h.
|
inline |
Returns a configured |ProcTableGLES| instance.
Definition at line 190 of file mock_gles.h.
|
static |
Returns an initialized |MockGLES| instance.
This method overwrites mocked global GLES function pointers to record invocations on this instance of |MockGLES|. As such, it should only be called once per test.
Definition at line 273 of file mock_gles.cc.
References FML_CHECK, impeller::testing::g_extensions, impeller::testing::g_mock_gles, impeller::testing::g_test_lock, impeller::testing::g_version, and impeller::testing::kExtensions.
|
static |
Definition at line 260 of file mock_gles.cc.
References FML_CHECK, impeller::testing::g_extensions, impeller::testing::g_mock_gles, impeller::testing::g_test_lock, impeller::testing::g_version, and impeller::testing::kExtensions.
Referenced by impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST_P().
|
friend |
Definition at line 186 of file mock_gles.cc.
|
friend |