| 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/valuebuffer_manager.h" | |
| 32 #include "gpu/command_buffer/service/vertex_array_manager.h" | 31 #include "gpu/command_buffer/service/vertex_array_manager.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 34 #include "ui/gl/gl_mock.h" | 33 #include "ui/gl/gl_mock.h" |
| 35 #include "ui/gl/gl_surface_stub.h" | 34 #include "ui/gl/gl_surface_stub.h" |
| 36 #include "ui/gl/gl_version_info.h" | 35 #include "ui/gl/gl_version_info.h" |
| 37 | 36 |
| 38 namespace base { | 37 namespace base { |
| 39 class CommandLine; | 38 class CommandLine; |
| 40 } | 39 } |
| 41 | 40 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 126 } |
| 128 | 127 |
| 129 Shader* GetShader(GLuint client_id) { | 128 Shader* GetShader(GLuint client_id) { |
| 130 return group_->shader_manager()->GetShader(client_id); | 129 return group_->shader_manager()->GetShader(client_id); |
| 131 } | 130 } |
| 132 | 131 |
| 133 Program* GetProgram(GLuint client_id) { | 132 Program* GetProgram(GLuint client_id) { |
| 134 return group_->program_manager()->GetProgram(client_id); | 133 return group_->program_manager()->GetProgram(client_id); |
| 135 } | 134 } |
| 136 | 135 |
| 137 Valuebuffer* GetValuebuffer(GLuint client_id) { | |
| 138 return group_->valuebuffer_manager()->GetValuebuffer(client_id); | |
| 139 } | |
| 140 | |
| 141 QueryManager::Query* GetQueryInfo(GLuint client_id) { | 136 QueryManager::Query* GetQueryInfo(GLuint client_id) { |
| 142 return decoder_->GetQueryManager()->GetQuery(client_id); | 137 return decoder_->GetQueryManager()->GetQuery(client_id); |
| 143 } | 138 } |
| 144 | 139 |
| 145 Sampler* GetSampler(GLuint client_id) { | 140 Sampler* GetSampler(GLuint client_id) { |
| 146 return group_->sampler_manager()->GetSampler(client_id); | 141 return group_->sampler_manager()->GetSampler(client_id); |
| 147 } | 142 } |
| 148 | 143 |
| 149 bool GetTransformFeedbackServiceId( | 144 bool GetTransformFeedbackServiceId( |
| 150 GLuint client_id, GLuint* service_id) const { | 145 GLuint client_id, GLuint* service_id) const { |
| 151 return group_->GetTransformFeedbackServiceId(client_id, service_id); | 146 return group_->GetTransformFeedbackServiceId(client_id, service_id); |
| 152 } | 147 } |
| 153 | 148 |
| 154 bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const { | 149 bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const { |
| 155 return group_->GetSyncServiceId(client_id, service_id); | 150 return group_->GetSyncServiceId(client_id, service_id); |
| 156 } | 151 } |
| 157 | 152 |
| 158 // This name doesn't match the underlying function, but doing it this way | 153 // This name doesn't match the underlying function, but doing it this way |
| 159 // prevents the need to special-case the unit test generation | 154 // prevents the need to special-case the unit test generation |
| 160 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { | 155 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { |
| 161 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); | 156 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); |
| 162 } | 157 } |
| 163 | 158 |
| 164 ProgramManager* program_manager() { | 159 ProgramManager* program_manager() { |
| 165 return group_->program_manager(); | 160 return group_->program_manager(); |
| 166 } | 161 } |
| 167 | 162 |
| 168 ValuebufferManager* valuebuffer_manager() { | |
| 169 return group_->valuebuffer_manager(); | |
| 170 } | |
| 171 | |
| 172 ValueStateMap* pending_valuebuffer_state() { | |
| 173 return group_->pending_valuebuffer_state(); | |
| 174 } | |
| 175 | |
| 176 FeatureInfo* feature_info() { | 163 FeatureInfo* feature_info() { |
| 177 return group_->feature_info(); | 164 return group_->feature_info(); |
| 178 } | 165 } |
| 179 | 166 |
| 180 FramebufferCompletenessCache* framebuffer_completeness_cache() const { | 167 FramebufferCompletenessCache* framebuffer_completeness_cache() const { |
| 181 return group_->framebuffer_completeness_cache(); | 168 return group_->framebuffer_completeness_cache(); |
| 182 } | 169 } |
| 183 | 170 |
| 184 ImageManager* GetImageManager() { return decoder_->GetImageManager(); } | 171 ImageManager* GetImageManager() { return decoder_->GetImageManager(); } |
| 185 | 172 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 GLuint client_program_id_; | 632 GLuint client_program_id_; |
| 646 GLuint client_renderbuffer_id_; | 633 GLuint client_renderbuffer_id_; |
| 647 GLuint client_sampler_id_; | 634 GLuint client_sampler_id_; |
| 648 GLuint client_shader_id_; | 635 GLuint client_shader_id_; |
| 649 GLuint client_texture_id_; | 636 GLuint client_texture_id_; |
| 650 GLuint client_element_buffer_id_; | 637 GLuint client_element_buffer_id_; |
| 651 GLuint client_vertex_shader_id_; | 638 GLuint client_vertex_shader_id_; |
| 652 GLuint client_fragment_shader_id_; | 639 GLuint client_fragment_shader_id_; |
| 653 GLuint client_query_id_; | 640 GLuint client_query_id_; |
| 654 GLuint client_vertexarray_id_; | 641 GLuint client_vertexarray_id_; |
| 655 GLuint client_valuebuffer_id_; | |
| 656 GLuint client_transformfeedback_id_; | 642 GLuint client_transformfeedback_id_; |
| 657 GLuint client_sync_id_; | 643 GLuint client_sync_id_; |
| 658 | 644 |
| 659 uint32_t shared_memory_id_; | 645 uint32_t shared_memory_id_; |
| 660 uint32_t shared_memory_offset_; | 646 uint32_t shared_memory_offset_; |
| 661 void* shared_memory_address_; | 647 void* shared_memory_address_; |
| 662 void* shared_memory_base_; | 648 void* shared_memory_base_; |
| 663 | 649 |
| 664 GLuint service_renderbuffer_id_; | 650 GLuint service_renderbuffer_id_; |
| 665 bool service_renderbuffer_valid_; | 651 bool service_renderbuffer_valid_; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 }; | 765 }; |
| 780 | 766 |
| 781 // SpecializedSetup specializations that are needed in multiple unittest files. | 767 // SpecializedSetup specializations that are needed in multiple unittest files. |
| 782 template <> | 768 template <> |
| 783 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 769 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
| 784 | 770 |
| 785 } // namespace gles2 | 771 } // namespace gles2 |
| 786 } // namespace gpu | 772 } // namespace gpu |
| 787 | 773 |
| 788 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 774 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| OLD | NEW |