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

Unified Diff: cc/test/test_gles2_interface.cc

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 side-by-side diff with in-line comments
Download patch
Index: cc/test/test_gles2_interface.cc
diff --git a/cc/test/test_gles2_interface.cc b/cc/test/test_gles2_interface.cc
index c9502d5c82628d4576f0f2f75e6038a2494c8c4a..a1a551ea828299d1df56703de13ec2353bcbeac7 100644
--- a/cc/test/test_gles2_interface.cc
+++ b/cc/test/test_gles2_interface.cc
@@ -16,6 +16,55 @@ TestGLES2Interface::TestGLES2Interface(TestWebGraphicsContext3D* test_context)
TestGLES2Interface::~TestGLES2Interface() {}
+void TestGLES2Interface::GenTextures(GLsizei n, GLuint* textures) {
+ for (GLsizei i = 0; i < n; ++i) {
+ textures[i] = test_context_->createTexture();
+ }
+}
+
+void TestGLES2Interface::GenBuffers(GLsizei n, GLuint* buffers) {
+ for (GLsizei i = 0; i < n; ++i) {
+ buffers[i] = test_context_->createBuffer();
+ }
+}
+
+void TestGLES2Interface::GenFramebuffers(GLsizei n, GLuint* framebuffers) {
+ for (GLsizei i = 0; i < n; ++i) {
+ framebuffers[i] = test_context_->createFramebuffer();
+ }
+}
+
+void TestGLES2Interface::GenQueriesEXT(GLsizei n, GLuint* queries) {
+ for (GLsizei i = 0; i < n; ++i) {
+ queries[i] = test_context_->createQueryEXT();
+ }
+}
+
+void TestGLES2Interface::DeleteTextures(GLsizei n, const GLuint* textures) {
+ for (GLsizei i = 0; i < n; ++i) {
+ test_context_->deleteTexture(textures[i]);
+ }
+}
+
+void TestGLES2Interface::DeleteBuffers(GLsizei n, const GLuint* buffers) {
+ for (GLsizei i = 0; i < n; ++i) {
+ test_context_->deleteBuffer(buffers[i]);
+ }
+}
+
+void TestGLES2Interface::DeleteFramebuffers(GLsizei n,
+ const GLuint* framebuffers) {
+ for (GLsizei i = 0; i < n; ++i) {
+ test_context_->deleteFramebuffer(framebuffers[i]);
+ }
+}
+
+void TestGLES2Interface::DeleteQueriesEXT(GLsizei n, const GLuint* queries) {
+ for (GLsizei i = 0; i < n; ++i) {
+ test_context_->deleteQueryEXT(queries[i]);
+ }
+}
+
GLuint TestGLES2Interface::CreateShader(GLenum type) {
return test_context_->createShader(type);
}
@@ -24,6 +73,10 @@ GLuint TestGLES2Interface::CreateProgram() {
return test_context_->createProgram();
}
+void TestGLES2Interface::BindTexture(GLenum target, GLuint texture) {
jamesr 2013/12/05 23:59:40 fyi: i've expanded all of these forwarding calls o
+ test_context_->bindTexture(target, texture);
+}
+
void TestGLES2Interface::GetShaderiv(GLuint shader,
GLenum pname,
GLint* params) {
@@ -44,8 +97,111 @@ void TestGLES2Interface::GetShaderPrecisionFormat(GLenum shadertype,
shadertype, precisiontype, range, precision);
}
+void TestGLES2Interface::Viewport(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ test_context_->viewport(x, y, width, height);
+}
+
+void TestGLES2Interface::ActiveTexture(GLenum target) {
+ test_context_->activeTexture(target);
+}
+
void TestGLES2Interface::UseProgram(GLuint program) {
test_context_->useProgram(program);
}
+GLenum TestGLES2Interface::CheckFramebufferStatus(GLenum target) {
+ return test_context_->checkFramebufferStatus(target);
+}
+
+void TestGLES2Interface::Scissor(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ test_context_->scissor(x, y, width, height);
+}
+
+void TestGLES2Interface::DrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ test_context_->drawElements(
+ mode,
+ count,
+ type,
+ reinterpret_cast<intptr_t>(const_cast<void*>(indices)));
+}
+
+void TestGLES2Interface::ClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ test_context_->clearColor(red, green, blue, alpha);
+}
+
+void TestGLES2Interface::ClearStencil(GLint s) {
+ test_context_->clearStencil(s);
+}
+
+void TestGLES2Interface::Clear(GLbitfield mask) { test_context_->clear(mask); }
+
+void TestGLES2Interface::Flush() { test_context_->flush(); }
+
+void TestGLES2Interface::Finish() { test_context_->finish(); }
+
+void TestGLES2Interface::Enable(GLenum cap) { test_context_->enable(cap); }
+
+void TestGLES2Interface::Disable(GLenum cap) { test_context_->disable(cap); }
+
+void TestGLES2Interface::BindFramebuffer(GLenum target, GLuint buffer) {
+ test_context_->bindFramebuffer(target, buffer);
+}
+
+void TestGLES2Interface::BindBuffer(GLenum target, GLuint buffer) {
+ test_context_->bindBuffer(target, buffer);
+}
+
+void* TestGLES2Interface::MapBufferCHROMIUM(GLuint target, GLenum access) {
+ return test_context_->mapBufferCHROMIUM(target, access);
+}
+
+GLboolean TestGLES2Interface::UnmapBufferCHROMIUM(GLuint target) {
+ return test_context_->unmapBufferCHROMIUM(target);
+}
+
+void TestGLES2Interface::BufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ test_context_->bufferData(target, size, data, usage);
+}
+
+void TestGLES2Interface::WaitSyncPointCHROMIUM(GLuint sync_point) {
+ test_context_->waitSyncPoint(sync_point);
+}
+
+GLuint TestGLES2Interface::InsertSyncPointCHROMIUM() {
+ return test_context_->insertSyncPoint();
+}
+
+void TestGLES2Interface::BeginQueryEXT(GLenum target, GLuint id) {
+ test_context_->beginQueryEXT(target, id);
+}
+
+void TestGLES2Interface::EndQueryEXT(GLenum target) {
+ test_context_->endQueryEXT(target);
+}
+
+void TestGLES2Interface::DiscardFramebufferEXT(GLenum target,
+ GLsizei count,
+ const GLenum* attachments) {
+ test_context_->discardFramebufferEXT(target, count, attachments);
+}
+
+void TestGLES2Interface::GenMailboxCHROMIUM(GLbyte* mailbox) {
+ test_context_->genMailboxCHROMIUM(mailbox);
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698