OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
7 | 7 |
8 #include "app/gfx/gl/gl_context_stub.h" | 8 #include "app/gfx/gl/gl_context_stub.h" |
9 #include "gpu/command_buffer/common/gl_mock.h" | 9 #include "gpu/command_buffer/common/gl_mock.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
11 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 11 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
12 #include "gpu/command_buffer/service/buffer_manager.h" | 12 #include "gpu/command_buffer/service/buffer_manager.h" |
13 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 13 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
14 #include "gpu/command_buffer/service/context_group.h" | 14 #include "gpu/command_buffer/service/context_group.h" |
15 #include "gpu/command_buffer/service/framebuffer_manager.h" | 15 #include "gpu/command_buffer/service/framebuffer_manager.h" |
16 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 16 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
17 #include "gpu/command_buffer/service/program_manager.h" | 17 #include "gpu/command_buffer/service/program_manager.h" |
18 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 18 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
19 #include "gpu/command_buffer/service/shader_manager.h" | 19 #include "gpu/command_buffer/service/shader_manager.h" |
20 #include "gpu/command_buffer/service/texture_manager.h" | 20 #include "gpu/command_buffer/service/texture_manager.h" |
21 #include "gpu/GLES2/gles2_command_buffer.h" | 21 #include "gpu/GLES2/gles2_command_buffer.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace gpu { | 24 namespace gpu { |
25 namespace gles2 { | 25 namespace gles2 { |
26 | 26 |
27 class GLES2DecoderTestBase : public testing::Test { | 27 class GLES2DecoderTestBase : public testing::Test { |
28 public: | 28 public: |
29 GLES2DecoderTestBase() | 29 GLES2DecoderTestBase(); |
30 : client_buffer_id_(100), | 30 virtual ~GLES2DecoderTestBase(); |
31 client_framebuffer_id_(101), | |
32 client_program_id_(102), | |
33 client_renderbuffer_id_(103), | |
34 client_shader_id_(104), | |
35 client_texture_id_(106), | |
36 client_element_buffer_id_(107) { | |
37 memset(immediate_buffer_, 0xEE, sizeof(immediate_buffer_)); | |
38 } | |
39 | 31 |
40 protected: | 32 protected: |
41 static const GLint kMaxTextureSize = 2048; | 33 static const GLint kMaxTextureSize = 2048; |
42 static const GLint kMaxCubeMapTextureSize = 256; | 34 static const GLint kMaxCubeMapTextureSize = 256; |
43 static const GLint kNumVertexAttribs = 16; | 35 static const GLint kNumVertexAttribs = 16; |
44 static const GLint kNumTextureUnits = 8; | 36 static const GLint kNumTextureUnits = 8; |
45 static const GLint kMaxTextureImageUnits = 8; | 37 static const GLint kMaxTextureImageUnits = 8; |
46 static const GLint kMaxVertexTextureImageUnits = 2; | 38 static const GLint kMaxVertexTextureImageUnits = 2; |
47 static const GLint kMaxFragmentUniformVectors = 16; | 39 static const GLint kMaxFragmentUniformVectors = 16; |
48 static const GLint kMaxVaryingVectors = 8; | 40 static const GLint kMaxVaryingVectors = 8; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 void DeleteIndexBuffer(); | 394 void DeleteIndexBuffer(); |
403 | 395 |
404 GLuint client_vertex_shader_id_; | 396 GLuint client_vertex_shader_id_; |
405 GLuint client_fragment_shader_id_; | 397 GLuint client_fragment_shader_id_; |
406 }; | 398 }; |
407 | 399 |
408 } // namespace gles2 | 400 } // namespace gles2 |
409 } // namespace gpu | 401 } // namespace gpu |
410 | 402 |
411 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 403 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |