summaryrefslogtreecommitdiffstats
path: root/cc/test/test_gles2_interface.h
blob: c7f06370ba54b599c7c1439b885f686ac2abf09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_TEST_TEST_GLES2_INTERFACE_H_
#define CC_TEST_TEST_GLES2_INTERFACE_H_

#include "gpu/command_buffer/client/gles2_interface_stub.h"

namespace cc {
class TestWebGraphicsContext3D;

class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub {
 public:
  explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context);
  virtual ~TestGLES2Interface();

  virtual GLuint CreateShader(GLenum type) OVERRIDE;
  virtual GLuint CreateProgram() OVERRIDE;
  virtual void GetShaderiv(GLuint shader, GLenum pname, GLint* params) OVERRIDE;
  virtual void GetProgramiv(GLuint program,
                            GLenum pname,
                            GLint* params) OVERRIDE;
  virtual void GetShaderPrecisionFormat(GLenum shadertype,
                                        GLenum precisiontype,
                                        GLint* range,
                                        GLint* precision) OVERRIDE;
  virtual void UseProgram(GLuint program) OVERRIDE;

 private:
  TestWebGraphicsContext3D* test_context_;
};

}  // namespace cc

#endif  // CC_TEST_TEST_GLES2_INTERFACE_H_