[Android] Introduce new UMA action for when user copies Image URL from context menu
[chromium-blink-merge.git] / cc / test / test_gles2_interface.h
blob6f501bfab49dd8ca2558eb557c6dc6f66bdc6f4d
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 ShallowFinishCHROMIUM() override;
60 void ShallowFlushCHROMIUM() override;
61 void Enable(GLenum cap) override;
62 void Disable(GLenum cap) override;
64 void BindBuffer(GLenum target, GLuint buffer) override;
65 void BindRenderbuffer(GLenum target, GLuint buffer) override;
66 void BindFramebuffer(GLenum target, GLuint buffer) override;
68 void PixelStorei(GLenum pname, GLint param) override;
70 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 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 void TexStorage2DEXT(GLenum target,
89 GLsizei levels,
90 GLenum internalformat,
91 GLsizei width,
92 GLsizei height) override;
93 void TexImageIOSurface2DCHROMIUM(GLenum target,
94 GLsizei width,
95 GLsizei height,
96 GLuint io_surface_id,
97 GLuint plane) override;
98 void TexParameteri(GLenum target, GLenum pname, GLint param) override;
100 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 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 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 void WaitAsyncTexImage2DCHROMIUM(GLenum target) override;
127 GLuint CreateImageCHROMIUM(ClientBuffer buffer,
128 GLsizei width,
129 GLsizei height,
130 GLenum internalformat) override;
131 void DestroyImageCHROMIUM(GLuint image_id) override;
132 GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
133 GLsizei height,
134 GLenum internalformat,
135 GLenum usage) override;
136 void BindTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
137 void ReleaseTexImage2DCHROMIUM(GLenum target, GLint image_id) override;
138 void FramebufferRenderbuffer(GLenum target,
139 GLenum attachment,
140 GLenum renderbuffertarget,
141 GLuint renderbuffer) override;
142 void FramebufferTexture2D(GLenum target,
143 GLenum attachment,
144 GLenum textarget,
145 GLuint texture,
146 GLint level) override;
147 void RenderbufferStorage(GLenum target,
148 GLenum internalformat,
149 GLsizei width,
150 GLsizei height) override;
152 void* MapBufferCHROMIUM(GLuint target, GLenum access) override;
153 GLboolean UnmapBufferCHROMIUM(GLuint target) override;
154 void BufferData(GLenum target,
155 GLsizeiptr size,
156 const void* data,
157 GLenum usage) override;
159 void WaitSyncPointCHROMIUM(GLuint sync_point) override;
160 GLuint InsertSyncPointCHROMIUM() override;
162 void BeginQueryEXT(GLenum target, GLuint id) override;
163 void EndQueryEXT(GLenum target) override;
164 void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
166 void DiscardFramebufferEXT(GLenum target,
167 GLsizei count,
168 const GLenum* attachments) override;
169 void GenMailboxCHROMIUM(GLbyte* mailbox) override;
170 void ProduceTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
171 void ProduceTextureDirectCHROMIUM(GLuint texture,
172 GLenum target,
173 const GLbyte* mailbox) override;
174 void ConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox) override;
175 GLuint CreateAndConsumeTextureCHROMIUM(GLenum target,
176 const GLbyte* mailbox) override;
178 void ResizeCHROMIUM(GLuint width, GLuint height, float device_scale) override;
179 void LoseContextCHROMIUM(GLenum current, GLenum other) override;
180 GLenum GetGraphicsResetStatusKHR() override;
182 private:
183 TestWebGraphicsContext3D* test_context_;
186 } // namespace cc
188 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_