Flutter Engine
 
Loading...
Searching...
No Matches
mock_epoxy.h
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#ifndef FLUTTER_SHELL_PLATFORM_LINUX_TESTING_MOCK_EPOXY_H_
6#define FLUTTER_SHELL_PLATFORM_LINUX_TESTING_MOCK_EPOXY_H_
7
8#include "gmock/gmock.h"
9
10#include <epoxy/egl.h>
11#include <epoxy/gl.h>
12
13namespace flutter {
14namespace testing {
15
16class MockEpoxy {
17 public:
18 MockEpoxy();
19 ~MockEpoxy();
20
21 MOCK_METHOD(bool, epoxy_has_gl_extension, (const char* extension));
25 eglCreateImage,
26 (EGLDisplay dpy,
27 EGLContext ctx,
28 EGLenum target,
29 EGLClientBuffer buffer,
30 const EGLAttrib* attrib_list));
31 MOCK_METHOD(void, glClearColor, (GLfloat r, GLfloat g, GLfloat b, GLfloat a));
33 glBlitFramebuffer,
34 (GLint srcX0,
35 GLint srcY0,
36 GLint srcX1,
37 GLint srcY1,
38 GLint dstX0,
39 GLint dstY0,
40 GLint dstX1,
41 GLint dstY1,
42 GLbitfield mask,
43 GLenum filter));
45 glDeleteFramebuffers,
46 (GLsizei n, const GLuint* framebuffers));
48 glDeleteRenderbuffers,
49 (GLsizei n, const GLuint* renderbuffers));
50 MOCK_METHOD(void, glDeleteTextures, (GLsizei n, const GLuint* textures));
51 MOCK_METHOD(void, glGenFramebuffers, (GLsizei n, GLuint* framebuffers));
52 MOCK_METHOD(void, glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers));
53 MOCK_METHOD(void, glGenTextures, (GLsizei n, GLuint* textures));
54 MOCK_METHOD(const GLubyte*, glGetString, (GLenum pname));
55};
56
57} // namespace testing
58} // namespace flutter
59
60#endif // FLUTTER_SHELL_PLATFORM_LINUX_TESTING_MOCK_EPOXY_H_
MOCK_METHOD(const GLubyte *, glGetString,(GLenum pname))
MOCK_METHOD(void, glDeleteFramebuffers,(GLsizei n, const GLuint *framebuffers))
MOCK_METHOD(void, glDeleteTextures,(GLsizei n, const GLuint *textures))
MOCK_METHOD(void, glGenTextures,(GLsizei n, GLuint *textures))
MOCK_METHOD(void, glGenRenderbuffers,(GLsizei n, GLuint *renderbuffers))
MOCK_METHOD(int, epoxy_gl_version,())
MOCK_METHOD(void, glBlitFramebuffer,(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter))
MOCK_METHOD(void, glClearColor,(GLfloat r, GLfloat g, GLfloat b, GLfloat a))
MOCK_METHOD(void, eglCreateImage,(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list))
MOCK_METHOD(void, glGenFramebuffers,(GLsizei n, GLuint *framebuffers))
MOCK_METHOD(void, glDeleteRenderbuffers,(GLsizei n, const GLuint *renderbuffers))
MOCK_METHOD(bool, epoxy_is_desktop_gl,())
MOCK_METHOD(bool, epoxy_has_gl_extension,(const char *extension))
uint32_t * target
bool epoxy_has_gl_extension(const char *extension)
bool epoxy_is_desktop_gl(void)
int epoxy_gl_version(void)