| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #include "cc/test/test_gles2_interface.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "cc/test/test_web_graphics_context_3d.h" |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 TestGLES2Interface::TestGLES2Interface(TestWebGraphicsContext3D* test_context) |
| 13 : test_context_(test_context) { |
| 14 DCHECK(test_context_); |
| 15 } |
| 16 |
| 17 TestGLES2Interface::~TestGLES2Interface() {} |
| 18 |
| 19 GLuint TestGLES2Interface::CreateShader(GLenum type) { |
| 20 return test_context_->createShader(type); |
| 21 } |
| 22 |
| 23 GLuint TestGLES2Interface::CreateProgram() { |
| 24 return test_context_->createProgram(); |
| 25 } |
| 26 |
| 27 void TestGLES2Interface::GetShaderiv(GLuint shader, |
| 28 GLenum pname, |
| 29 GLint* params) { |
| 30 test_context_->getShaderiv(shader, pname, params); |
| 31 } |
| 32 |
| 33 void TestGLES2Interface::GetProgramiv(GLuint program, |
| 34 GLenum pname, |
| 35 GLint* params) { |
| 36 test_context_->getProgramiv(program, pname, params); |
| 37 } |
| 38 |
| 39 void TestGLES2Interface::GetShaderPrecisionFormat(GLenum shadertype, |
| 40 GLenum precisiontype, |
| 41 GLint* range, |
| 42 GLint* precision) { |
| 43 test_context_->getShaderPrecisionFormat( |
| 44 shadertype, precisiontype, range, precision); |
| 45 } |
| 46 |
| 47 void TestGLES2Interface::UseProgram(GLuint program) { |
| 48 test_context_->useProgram(program); |
| 49 } |
| 50 |
| 51 } // namespace cc |
| OLD | NEW |