Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: cc/test/test_gles2_interface.h

Issue 105553003: Use GLES2Interface in GLRenderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/test/test_gles2_interface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_TEST_GLES2_INTERFACE_H_ 5 #ifndef CC_TEST_TEST_GLES2_INTERFACE_H_
6 #define CC_TEST_TEST_GLES2_INTERFACE_H_ 6 #define CC_TEST_TEST_GLES2_INTERFACE_H_
7 7
8 #include "gpu/command_buffer/client/gles2_interface_stub.h" 8 #include "gpu/command_buffer/client/gles2_interface_stub.h"
9 9
10 namespace cc { 10 namespace cc {
11 class TestWebGraphicsContext3D; 11 class TestWebGraphicsContext3D;
12 12
13 class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub { 13 class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub {
14 public: 14 public:
15 explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context); 15 explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context);
16 virtual ~TestGLES2Interface(); 16 virtual ~TestGLES2Interface();
17 17
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;
22
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;
28
18 virtual GLuint CreateShader(GLenum type) OVERRIDE; 29 virtual GLuint CreateShader(GLenum type) OVERRIDE;
19 virtual GLuint CreateProgram() OVERRIDE; 30 virtual GLuint CreateProgram() OVERRIDE;
31
32 virtual void BindTexture(GLenum target, GLuint texture) OVERRIDE;
33
20 virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE; 34 virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE;
21 virtual void GetProgramiv(GLuint program, 35 virtual void GetProgramiv(GLuint program,
22 GLenum pname, 36 GLenum pname,
23 GLint* params) OVERRIDE; 37 GLint* params) OVERRIDE;
24 virtual void GetShaderPrecisionFormat(GLenum shadertype, 38 virtual void GetShaderPrecisionFormat(GLenum shadertype,
25 GLenum precisiontype, 39 GLenum precisiontype,
26 GLint* range, 40 GLint* range,
27 GLint* precision) OVERRIDE; 41 GLint* precision) OVERRIDE;
42 virtual GLenum CheckFramebufferStatus(GLenum target) OVERRIDE;
43
44 virtual void ActiveTexture(GLenum target) OVERRIDE;
45 virtual void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
46 OVERRIDE;
28 virtual void UseProgram(GLuint program) OVERRIDE; 47 virtual void UseProgram(GLuint program) OVERRIDE;
48 virtual void Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
49 OVERRIDE;
50 virtual void DrawElements(GLenum mode,
51 GLsizei count,
52 GLenum type,
53 const void* indices) OVERRIDE;
54 virtual void ClearColor(GLclampf red,
55 GLclampf green,
56 GLclampf blue,
57 GLclampf alpha) OVERRIDE;
58 virtual void ClearStencil(GLint s) OVERRIDE;
59 virtual void Clear(GLbitfield mask) OVERRIDE;
60 virtual void Flush() OVERRIDE;
61 virtual void Finish() OVERRIDE;
62 virtual void Enable(GLenum cap) OVERRIDE;
63 virtual void Disable(GLenum cap) OVERRIDE;
64
65 virtual void BindBuffer(GLenum target, GLuint buffer) OVERRIDE;
66 virtual void BindFramebuffer(GLenum target, GLuint buffer) OVERRIDE;
67
68 virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE;
69 virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE;
70 virtual void BufferData(GLenum target,
71 GLsizeiptr size,
72 const void* data,
73 GLenum usage) OVERRIDE;
74
75 virtual void WaitSyncPointCHROMIUM(GLuint sync_point) OVERRIDE;
76 virtual GLuint InsertSyncPointCHROMIUM() OVERRIDE;
77
78 virtual void BeginQueryEXT(GLenum target, GLuint id) OVERRIDE;
79 virtual void EndQueryEXT(GLenum target) OVERRIDE;
80
81 virtual void DiscardFramebufferEXT(GLenum target,
82 GLsizei count,
83 const GLenum* attachments) OVERRIDE;
84 virtual void GenMailboxCHROMIUM(GLbyte* mailbox) OVERRIDE;
29 85
30 private: 86 private:
31 TestWebGraphicsContext3D* test_context_; 87 TestWebGraphicsContext3D* test_context_;
32 }; 88 };
33 89
34 } // namespace cc 90 } // namespace cc
35 91
36 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_ 92 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/test/test_gles2_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698