Infer appropriate GNU_STACK alignment for a shared library.
[chromium-blink-merge.git] / cc / test / test_gles2_interface.h
blob3a174afd06b623cb137f45fbae303ec37af18d26
1 // Copyright 2013 The Chromium 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.
5 #ifndef CC_TEST_TEST_GLES2_INTERFACE_H_
6 #define CC_TEST_TEST_GLES2_INTERFACE_H_
8 #include "gpu/command_buffer/client/gles2_interface_stub.h"
10 namespace cc {
11 class TestWebGraphicsContext3D;
13 class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub {
14 public:
15 explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context);
16 ~TestGLES2Interface() override;
18 void GenTextures(GLsizei n, GLuint* textures) override;
19 void GenBuffers(GLsizei n, GLuint* buffers) override;
20 void GenFramebuffers(GLsizei n, GLuint* framebuffers) override;
21 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override;
22 void GenQueriesEXT(GLsizei n, GLuint* queries) override;
24 void DeleteTextures(GLsizei n, const GLuint* textures) override;
25 void DeleteBuffers(GLsizei n, const GLuint* buffers) override;
26 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) override;
27 void DeleteQueriesEXT(GLsizei n, const GLuint* queries) override;
29 GLuint CreateShader(GLenum type) override;
30 GLuint CreateProgram() override;
32 void BindTexture(GLenum target, GLuint texture) override;
34 void GetIntegerv(GLenum pname, GLint* params) override;
35 void GetShaderiv(GLuint shader, GLenum pname, GLint* params) override;
36 void GetProgramiv(GLuint program, GLenum pname, GLint* params) override;
37 void GetShaderPrecisionFormat(GLenum shadertype,
38 GLenum precisiontype,
39 GLint* range,
40 GLint* precision) override;
41 GLenum CheckFramebufferStatus(GLenum target) override;
43 void ActiveTexture(GLenum target) override;
44 void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override;
45 void UseProgram(GLuint program) override;
46 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) override;
47 void DrawElements(GLenum mode,
48 GLsizei count,
49 GLenum type,
50 const void* indices) override;
51 void ClearColor(GLclampf red,
52 GLclampf green,
53 GLclampf blue,
54 GLclampf alpha) override;
55 void ClearStencil(GLint s) override;
56 void Clear(GLbitfield mask) override;
57 void Flush() override;
58 void Finish() override;
59 void ShallowFlushCHROMIUM() override;
60 void Enable(GLenum cap) override;
61 void Disable(GLenum cap) override;
63 void BindBuffer(GLenum target, GLuint buffer) override;
64 void BindRenderbuffer(GLenum target, GLuint buffer) override;
65 void BindFramebuffer(GLenum target, GLuint buffer) override;
67 void PixelStorei(GLenum pname, GLint param) override;
69 void TexImage2D(GLenum target,
70 GLint level,
71 GLint internalformat,
72 GLsizei width,
73 GLsizei height,
74 GLint border,
75 GLenum format,
76 GLenum type,
77 const void* pixels) override;
78 void TexSubImage2D(GLenum target,
79 GLint level,
80 GLint xoffset,
81 GLint yoffset,
82 GLsizei width,
83 GLsizei height,
84 GLenum format,
85 GLenum type,
86 const void* pixels) override;
87 void TexStorage2DEXT(GLenum target,
88 GLsizei levels,
89 GLenum internalformat,
90 GLsizei width,
91 GLsizei height) override;
92 void TexImageIOSurface2DCHROMIUM(GLenum target,
93 GLsizei width,
94 GLsizei height,
95 GLuint io_surface_id,
96 GLuint plane) override;
97 void TexParameteri(GLenum target, GLenum pname, GLint param) override;
99 void AsyncTexImage2DCHROMIUM(GLenum target,
100 GLint level,
101 GLenum internalformat,
102 GLsizei width,
103 GLsizei height,
104 GLint border,
105 GLenum format,
106 GLenum type,
107 const void* pixels) override;
108 void AsyncTexSubImage2DCHROMIUM(GLenum target,
109 GLint level,
110 GLint xoffset,
111 GLint yoffset,
112 GLsizei width,
113 GLsizei height,
114 GLenum format,
115 GLenum type,
116 const void* pixels) override;
117 void CompressedTexImage2D(GLenum target,
118 GLint level,
119 GLenum internalformat,
120 GLsizei width,
121 GLsizei height,
122 GLint border,
123 GLsizei image_size,
124 const void* data) override;
125 void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
126 GLuint CreateImageCHROMIUM(ClientBuffer buffer,
127 GLsizei width,
128 GLsizei height,
129 GLenum internalformat) override;
130 void DestroyImageCHROMIUM(GLuint image_id) override;
131 GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
132 GLsizei height,
133 GLenum internalformat,
134 GLenum usage) override;
135 void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
136 void ReleaseTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
137 void FramebufferRenderbuffer(GLenum target,
138 GLenum attachment,
139 GLenum renderbuffertarget,
140 GLuint renderbuffer) override;
141 void FramebufferTexture2D(GLenum target,
142 GLenum attachment,
143 GLenum textarget,
144 GLuint texture,
145 GLint level) override;
146 void RenderbufferStorage(GLenum target,
147 GLenum internalformat,
148 GLsizei width,
149 GLsizei height) override;
151 void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
152 GLboolean UnmapBufferCHROMIUM(GLuint target) override;
153 void BufferData(GLenum target,
154 GLsizeiptr size,
155 const void* data,
156 GLenum usage) override;
158 void WaitSyncPointCHROMIUM(GLuint sync_point) override;
159 GLuint InsertSyncPointCHROMIUM() override;
161 void BeginQueryEXT(GLenum target, GLuint id) override;
162 void EndQueryEXT(GLenum target) override;
163 void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
165 void DiscardFramebufferEXT(GLenum target,
166 GLsizei count,
167 const GLenum* attachments) override;
168 void GenMailboxCHROMIUM(GLbyte* mailbox) override;
169 void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
170 void ProduceTextureDirectCHROMIUM(GLuint texture,
171 GLenum target,
172 const GLbyte* mailbox) override;
173 void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
174 GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
175 const GLbyte* mailbox) override;
177 void ResizeCHROMIUM(GLuint width, GLuint height, float device_scale) override;
178 void LoseContextCHROMIUM(GLenum current, GLenum other) override;
180 private:
181 TestWebGraphicsContext3D* test_context_;
184 } // namespace cc
186 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_