| OLD | NEW |
| 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 #include "cc/test/test_gles2_interface.h" | 5 #include "cc/test/test_gles2_interface.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "cc/test/test_web_graphics_context_3d.h" | 8 #include "cc/test/test_web_graphics_context_3d.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 buffers[i] = test_context_->createBuffer(); | 27 buffers[i] = test_context_->createBuffer(); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 void TestGLES2Interface::GenFramebuffers(GLsizei n, GLuint* framebuffers) { | 31 void TestGLES2Interface::GenFramebuffers(GLsizei n, GLuint* framebuffers) { |
| 32 for (GLsizei i = 0; i < n; ++i) { | 32 for (GLsizei i = 0; i < n; ++i) { |
| 33 framebuffers[i] = test_context_->createFramebuffer(); | 33 framebuffers[i] = test_context_->createFramebuffer(); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 void TestGLES2Interface::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { |
| 38 for (GLsizei i = 0; i < n; ++i) { |
| 39 renderbuffers[i] = test_context_->createRenderbuffer(); |
| 40 } |
| 41 } |
| 42 |
| 37 void TestGLES2Interface::GenQueriesEXT(GLsizei n, GLuint* queries) { | 43 void TestGLES2Interface::GenQueriesEXT(GLsizei n, GLuint* queries) { |
| 38 for (GLsizei i = 0; i < n; ++i) { | 44 for (GLsizei i = 0; i < n; ++i) { |
| 39 queries[i] = test_context_->createQueryEXT(); | 45 queries[i] = test_context_->createQueryEXT(); |
| 40 } | 46 } |
| 41 } | 47 } |
| 42 | 48 |
| 43 void TestGLES2Interface::DeleteTextures(GLsizei n, const GLuint* textures) { | 49 void TestGLES2Interface::DeleteTextures(GLsizei n, const GLuint* textures) { |
| 44 for (GLsizei i = 0; i < n; ++i) { | 50 for (GLsizei i = 0; i < n; ++i) { |
| 45 test_context_->deleteTexture(textures[i]); | 51 test_context_->deleteTexture(textures[i]); |
| 46 } | 52 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void TestGLES2Interface::Finish() { test_context_->finish(); } | 159 void TestGLES2Interface::Finish() { test_context_->finish(); } |
| 154 | 160 |
| 155 void TestGLES2Interface::ShallowFlushCHROMIUM() { | 161 void TestGLES2Interface::ShallowFlushCHROMIUM() { |
| 156 test_context_->shallowFlushCHROMIUM(); | 162 test_context_->shallowFlushCHROMIUM(); |
| 157 } | 163 } |
| 158 | 164 |
| 159 void TestGLES2Interface::Enable(GLenum cap) { test_context_->enable(cap); } | 165 void TestGLES2Interface::Enable(GLenum cap) { test_context_->enable(cap); } |
| 160 | 166 |
| 161 void TestGLES2Interface::Disable(GLenum cap) { test_context_->disable(cap); } | 167 void TestGLES2Interface::Disable(GLenum cap) { test_context_->disable(cap); } |
| 162 | 168 |
| 169 void TestGLES2Interface::BindRenderbuffer(GLenum target, GLuint buffer) { |
| 170 test_context_->bindRenderbuffer(target, buffer); |
| 171 } |
| 172 |
| 163 void TestGLES2Interface::BindFramebuffer(GLenum target, GLuint buffer) { | 173 void TestGLES2Interface::BindFramebuffer(GLenum target, GLuint buffer) { |
| 164 test_context_->bindFramebuffer(target, buffer); | 174 test_context_->bindFramebuffer(target, buffer); |
| 165 } | 175 } |
| 166 | 176 |
| 167 void TestGLES2Interface::BindBuffer(GLenum target, GLuint buffer) { | 177 void TestGLES2Interface::BindBuffer(GLenum target, GLuint buffer) { |
| 168 test_context_->bindBuffer(target, buffer); | 178 test_context_->bindBuffer(target, buffer); |
| 169 } | 179 } |
| 170 | 180 |
| 171 void TestGLES2Interface::TexImage2D(GLenum target, | 181 void TestGLES2Interface::TexImage2D(GLenum target, |
| 172 GLint level, | 182 GLint level, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 test_context_->texImageIOSurface2DCHROMIUM( | 227 test_context_->texImageIOSurface2DCHROMIUM( |
| 218 target, width, height, io_surface_id, plane); | 228 target, width, height, io_surface_id, plane); |
| 219 } | 229 } |
| 220 | 230 |
| 221 void TestGLES2Interface::TexParameteri(GLenum target, | 231 void TestGLES2Interface::TexParameteri(GLenum target, |
| 222 GLenum pname, | 232 GLenum pname, |
| 223 GLint param) { | 233 GLint param) { |
| 224 test_context_->texParameteri(target, pname, param); | 234 test_context_->texParameteri(target, pname, param); |
| 225 } | 235 } |
| 226 | 236 |
| 237 void TestGLES2Interface::FramebufferRenderbuffer(GLenum target, |
| 238 GLenum attachment, |
| 239 GLenum renderbuffertarget, |
| 240 GLuint renderbuffer) { |
| 241 test_context_->framebufferRenderbuffer( |
| 242 target, attachment, renderbuffertarget, renderbuffer); |
| 243 } |
| 244 void TestGLES2Interface::FramebufferTexture2D(GLenum target, |
| 245 GLenum attachment, |
| 246 GLenum textarget, |
| 247 GLuint texture, |
| 248 GLint level) { |
| 249 test_context_->framebufferTexture2D( |
| 250 target, attachment, textarget, texture, level); |
| 251 } |
| 252 |
| 253 void TestGLES2Interface::RenderbufferStorage(GLenum target, |
| 254 GLenum internalformat, |
| 255 GLsizei width, |
| 256 GLsizei height) { |
| 257 test_context_->renderbufferStorage(target, internalformat, width, height); |
| 258 } |
| 259 |
| 227 void TestGLES2Interface::AsyncTexImage2DCHROMIUM(GLenum target, | 260 void TestGLES2Interface::AsyncTexImage2DCHROMIUM(GLenum target, |
| 228 GLint level, | 261 GLint level, |
| 229 GLenum internalformat, | 262 GLenum internalformat, |
| 230 GLsizei width, | 263 GLsizei width, |
| 231 GLsizei height, | 264 GLsizei height, |
| 232 GLint border, | 265 GLint border, |
| 233 GLenum format, | 266 GLenum format, |
| 234 GLenum type, | 267 GLenum type, |
| 235 const void* pixels) { | 268 const void* pixels) { |
| 236 test_context_->asyncTexImage2DCHROMIUM(target, | 269 test_context_->asyncTexImage2DCHROMIUM(target, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 GLuint height, | 414 GLuint height, |
| 382 float device_scale) { | 415 float device_scale) { |
| 383 test_context_->reshapeWithScaleFactor(width, height, device_scale); | 416 test_context_->reshapeWithScaleFactor(width, height, device_scale); |
| 384 } | 417 } |
| 385 | 418 |
| 386 void TestGLES2Interface::LoseContextCHROMIUM(GLenum current, GLenum other) { | 419 void TestGLES2Interface::LoseContextCHROMIUM(GLenum current, GLenum other) { |
| 387 test_context_->loseContextCHROMIUM(current, other); | 420 test_context_->loseContextCHROMIUM(current, other); |
| 388 } | 421 } |
| 389 | 422 |
| 390 } // namespace cc | 423 } // namespace cc |
| OLD | NEW |