OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 21 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
22 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" | 22 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" |
23 #include "gpu/command_buffer/service/gpu_preferences.h" | 23 #include "gpu/command_buffer/service/gpu_preferences.h" |
24 #include "gpu/command_buffer/service/program_manager.h" | 24 #include "gpu/command_buffer/service/program_manager.h" |
25 #include "gpu/command_buffer/service/query_manager.h" | 25 #include "gpu/command_buffer/service/query_manager.h" |
26 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 26 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
27 #include "gpu/command_buffer/service/sampler_manager.h" | 27 #include "gpu/command_buffer/service/sampler_manager.h" |
28 #include "gpu/command_buffer/service/shader_manager.h" | 28 #include "gpu/command_buffer/service/shader_manager.h" |
29 #include "gpu/command_buffer/service/test_helper.h" | 29 #include "gpu/command_buffer/service/test_helper.h" |
30 #include "gpu/command_buffer/service/texture_manager.h" | 30 #include "gpu/command_buffer/service/texture_manager.h" |
| 31 #include "gpu/command_buffer/service/transform_feedback_manager.h" |
31 #include "gpu/command_buffer/service/vertex_array_manager.h" | 32 #include "gpu/command_buffer/service/vertex_array_manager.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
33 #include "ui/gl/gl_mock.h" | 34 #include "ui/gl/gl_mock.h" |
34 #include "ui/gl/gl_surface_stub.h" | 35 #include "ui/gl/gl_surface_stub.h" |
35 #include "ui/gl/gl_version_info.h" | 36 #include "ui/gl/gl_version_info.h" |
36 | 37 |
37 namespace base { | 38 namespace base { |
38 class CommandLine; | 39 class CommandLine; |
39 } | 40 } |
40 | 41 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 135 } |
135 | 136 |
136 QueryManager::Query* GetQueryInfo(GLuint client_id) { | 137 QueryManager::Query* GetQueryInfo(GLuint client_id) { |
137 return decoder_->GetQueryManager()->GetQuery(client_id); | 138 return decoder_->GetQueryManager()->GetQuery(client_id); |
138 } | 139 } |
139 | 140 |
140 Sampler* GetSampler(GLuint client_id) { | 141 Sampler* GetSampler(GLuint client_id) { |
141 return group_->sampler_manager()->GetSampler(client_id); | 142 return group_->sampler_manager()->GetSampler(client_id); |
142 } | 143 } |
143 | 144 |
144 bool GetTransformFeedbackServiceId( | 145 TransformFeedback* GetTransformFeedback(GLuint client_id) { |
145 GLuint client_id, GLuint* service_id) const { | 146 return decoder_->GetTransformFeedbackManager()->GetTransformFeedback( |
146 return group_->GetTransformFeedbackServiceId(client_id, service_id); | 147 client_id); |
147 } | 148 } |
148 | 149 |
149 bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const { | 150 bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const { |
150 return group_->GetSyncServiceId(client_id, service_id); | 151 return group_->GetSyncServiceId(client_id, service_id); |
151 } | 152 } |
152 | 153 |
153 // This name doesn't match the underlying function, but doing it this way | 154 // This name doesn't match the underlying function, but doing it this way |
154 // prevents the need to special-case the unit test generation | 155 // prevents the need to special-case the unit test generation |
155 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { | 156 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { |
156 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); | 157 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 static const GLuint kServiceFramebufferId = 302; | 504 static const GLuint kServiceFramebufferId = 302; |
504 static const GLuint kServiceRenderbufferId = 303; | 505 static const GLuint kServiceRenderbufferId = 303; |
505 static const GLuint kServiceTextureId = 304; | 506 static const GLuint kServiceTextureId = 304; |
506 static const GLuint kServiceProgramId = 305; | 507 static const GLuint kServiceProgramId = 305; |
507 static const GLuint kServiceSamplerId = 306; | 508 static const GLuint kServiceSamplerId = 306; |
508 static const GLuint kServiceShaderId = 307; | 509 static const GLuint kServiceShaderId = 307; |
509 static const GLuint kServiceElementBufferId = 308; | 510 static const GLuint kServiceElementBufferId = 308; |
510 static const GLuint kServiceQueryId = 309; | 511 static const GLuint kServiceQueryId = 309; |
511 static const GLuint kServiceVertexArrayId = 310; | 512 static const GLuint kServiceVertexArrayId = 310; |
512 static const GLuint kServiceTransformFeedbackId = 311; | 513 static const GLuint kServiceTransformFeedbackId = 311; |
513 static const GLuint kServiceSyncId = 312; | 514 static const GLuint kServiceDefaultTransformFeedbackId = 312; |
| 515 static const GLuint kServiceSyncId = 313; |
514 | 516 |
515 static const int32_t kSharedMemoryId = 401; | 517 static const int32_t kSharedMemoryId = 401; |
516 static const size_t kSharedBufferSize = 2048; | 518 static const size_t kSharedBufferSize = 2048; |
517 static const uint32_t kSharedMemoryOffset = 132; | 519 static const uint32_t kSharedMemoryOffset = 132; |
518 static const int32_t kInvalidSharedMemoryId = 402; | 520 static const int32_t kInvalidSharedMemoryId = 402; |
519 static const uint32_t kInvalidSharedMemoryOffset = kSharedBufferSize + 1; | 521 static const uint32_t kInvalidSharedMemoryOffset = kSharedBufferSize + 1; |
520 static const uint32_t kInitialResult = 0xBDBDBDBDu; | 522 static const uint32_t kInitialResult = 0xBDBDBDBDu; |
521 static const uint8_t kInitialMemoryValue = 0xBDu; | 523 static const uint8_t kInitialMemoryValue = 0xBDu; |
522 | 524 |
523 static const uint32_t kNewClientId = 501; | 525 static const uint32_t kNewClientId = 501; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 }; | 767 }; |
766 | 768 |
767 // SpecializedSetup specializations that are needed in multiple unittest files. | 769 // SpecializedSetup specializations that are needed in multiple unittest files. |
768 template <> | 770 template <> |
769 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 771 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
770 | 772 |
771 } // namespace gles2 | 773 } // namespace gles2 |
772 } // namespace gpu | 774 } // namespace gpu |
773 | 775 |
774 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 776 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |