Lots of random cleanups, mostly for native_theme_win.cc:
[chromium-blink-merge.git] / cc / test / test_gles2_interface.h
blobbe18e73dcb987b2ed57438379f8193545a75dea8
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 virtual ~TestGLES2Interface();
18 virtual void GenTextures(GLsizei n, GLuint* textures) OVERRIDE;
19 virtual void GenBuffers(GLsizei n, GLuint* buffers) OVERRIDE;
20 virtual void GenFramebuffers(GLsizei n, GLuint* framebuffers) OVERRIDE;
21 virtual void GenQueriesEXT(GLsizei n, GLuint* queries) OVERRIDE;
23 virtual void DeleteTextures(GLsizei n, const GLuint* textures) OVERRIDE;
24 virtual void DeleteBuffers(GLsizei n, const GLuint* buffers) OVERRIDE;
25 virtual void DeleteFramebuffers(GLsizei n,
26 const GLuint* framebuffers) OVERRIDE;
27 virtual void DeleteQueriesEXT(GLsizei n, const GLuint* queries) OVERRIDE;
29 virtual GLuint CreateShader(GLenum type) OVERRIDE;
30 virtual GLuint CreateProgram() OVERRIDE;
32 virtual void BindTexture(GLenum target, GLuint texture) OVERRIDE;
34 virtual void GetIntegerv(GLenum pname, GLint* params) OVERRIDE;
35 virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE;
36 virtual void GetProgramiv(GLuint program,
37 GLenum pname,
38 GLint* params) OVERRIDE;
39 virtual void GetShaderPrecisionFormat(GLenum shadertype,
40 GLenum precisiontype,
41 GLint* range,
42 GLint* precision) OVERRIDE;
43 virtual GLenum CheckFramebufferStatus(GLenum target) OVERRIDE;
45 virtual void ActiveTexture(GLenum target) OVERRIDE;
46 virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
47 OVERRIDE;
48 virtual void UseProgram(GLuint program) OVERRIDE;
49 virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
50 OVERRIDE;
51 virtual void DrawElements(GLenum mode,
52 GLsizei count,
53 GLenum type,
54 const void* indices) OVERRIDE;
55 virtual void ClearColor(GLclampf red,
56 GLclampf green,
57 GLclampf blue,
58 GLclampf alpha) OVERRIDE;
59 virtual void ClearStencil(GLint s) OVERRIDE;
60 virtual void Clear(GLbitfield mask) OVERRIDE;
61 virtual void Flush() OVERRIDE;
62 virtual void Finish() OVERRIDE;
63 virtual void ShallowFlushCHROMIUM() OVERRIDE;
64 virtual void Enable(GLenum cap) OVERRIDE;
65 virtual void Disable(GLenum cap) OVERRIDE;
67 virtual void BindBuffer(GLenum target, GLuint buffer) OVERRIDE;
68 virtual void BindFramebuffer(GLenum target, GLuint buffer) OVERRIDE;
70 virtual void TexImage2D(GLenum target,
71 GLint level,
72 GLint internalformat,
73 GLsizei width,
74 GLsizei height,
75 GLint border,
76 GLenum format,
77 GLenum type,
78 const void* pixels) OVERRIDE;
79 virtual void TexSubImage2D(GLenum target,
80 GLint level,
81 GLint xoffset,
82 GLint yoffset,
83 GLsizei width,
84 GLsizei height,
85 GLenum format,
86 GLenum type,
87 const void* pixels) OVERRIDE;
88 virtual void TexStorage2DEXT(GLenum target,
89 GLsizei levels,
90 GLenum internalformat,
91 GLsizei width,
92 GLsizei height) OVERRIDE;
93 virtual void TexImageIOSurface2DCHROMIUM(GLenum target,
94 GLsizei width,
95 GLsizei height,
96 GLuint io_surface_id,
97 GLuint plane) OVERRIDE;
98 virtual void TexParameteri(GLenum target, GLenum pname, GLint param) OVERRIDE;
100 virtual void AsyncTexImage2DCHROMIUM(GLenum target,
101 GLint level,
102 GLenum internalformat,
103 GLsizei width,
104 GLsizei height,
105 GLint border,
106 GLenum format,
107 GLenum type,
108 const void* pixels) OVERRIDE;
109 virtual void AsyncTexSubImage2DCHROMIUM(GLenum target,
110 GLint level,
111 GLint xoffset,
112 GLint yoffset,
113 GLsizei width,
114 GLsizei height,
115 GLenum format,
116 GLenum type,
117 const void* pixels) OVERRIDE;
118 virtual void CompressedTexImage2D(GLenum target,
119 GLint level,
120 GLenum internalformat,
121 GLsizei width,
122 GLsizei height,
123 GLint border,
124 GLsizei image_size,
125 const void* data) OVERRIDE;
126 virtual void WaitAsyncTexImage2DCHROMIUM(GLenum target) OVERRIDE;
127 virtual GLuint CreateImageCHROMIUM(GLsizei width,
128 GLsizei height,
129 GLenum internalformat,
130 GLenum usage) OVERRIDE;
131 virtual void DestroyImageCHROMIUM(GLuint image_id) OVERRIDE;
132 virtual void* MapImageCHROMIUM(GLuint image_id) OVERRIDE;
133 virtual void GetImageParameterivCHROMIUM(GLuint image_id,
134 GLenum pname,
135 GLint* params) OVERRIDE;
136 virtual void UnmapImageCHROMIUM(GLuint image_id) OVERRIDE;
137 virtual void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) OVERRIDE;
138 virtual void ReleaseTexImage2DCHROMIUM(GLenum target,
139 GLint image_id) OVERRIDE;
141 virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE;
142 virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE;
143 virtual void BufferData(GLenum target,
144 GLsizeiptr size,
145 const void* data,
146 GLenum usage) OVERRIDE;
148 virtual void WaitSyncPointCHROMIUM(GLuint sync_point) OVERRIDE;
149 virtual GLuint InsertSyncPointCHROMIUM() OVERRIDE;
151 virtual void BeginQueryEXT(GLenum target, GLuint id) OVERRIDE;
152 virtual void EndQueryEXT(GLenum target) OVERRIDE;
153 virtual void GetQueryObjectuivEXT(GLuint id,
154 GLenum pname,
155 GLuint* params) OVERRIDE;
157 virtual void DiscardFramebufferEXT(GLenum target,
158 GLsizei count,
159 const GLenum* attachments) OVERRIDE;
160 virtual void GenMailboxCHROMIUM(GLbyte* mailbox) OVERRIDE;
161 virtual void ProduceTextureCHROMIUM(GLenum target,
162 const GLbyte* mailbox) OVERRIDE;
163 virtual void ConsumeTextureCHROMIUM(GLenum target,
164 const GLbyte* mailbox) OVERRIDE;
166 virtual void ResizeCHROMIUM(GLuint width,
167 GLuint height,
168 float device_scale) OVERRIDE;
169 virtual void LoseContextCHROMIUM(GLenum current, GLenum other) OVERRIDE;
171 private:
172 TestWebGraphicsContext3D* test_context_;
175 } // namespace cc
177 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_