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 "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 T GetSharedMemoryAs() { | 90 T GetSharedMemoryAs() { |
91 return reinterpret_cast<T>(shared_memory_address_); | 91 return reinterpret_cast<T>(shared_memory_address_); |
92 } | 92 } |
93 | 93 |
94 template <typename T> | 94 template <typename T> |
95 T GetSharedMemoryAsWithOffset(uint32 offset) { | 95 T GetSharedMemoryAsWithOffset(uint32 offset) { |
96 void* ptr = reinterpret_cast<int8*>(shared_memory_address_) + offset; | 96 void* ptr = reinterpret_cast<int8*>(shared_memory_address_) + offset; |
97 return reinterpret_cast<T>(ptr); | 97 return reinterpret_cast<T>(ptr); |
98 } | 98 } |
99 | 99 |
100 IdAllocatorInterface* GetIdAllocator(GLuint namespace_id) { | |
101 return group_->GetIdAllocator(namespace_id); | |
102 } | |
103 | |
104 Buffer* GetBuffer(GLuint service_id) { | 100 Buffer* GetBuffer(GLuint service_id) { |
105 return group_->buffer_manager()->GetBuffer(service_id); | 101 return group_->buffer_manager()->GetBuffer(service_id); |
106 } | 102 } |
107 | 103 |
108 Framebuffer* GetFramebuffer(GLuint service_id) { | 104 Framebuffer* GetFramebuffer(GLuint service_id) { |
109 return group_->framebuffer_manager()->GetFramebuffer(service_id); | 105 return group_->framebuffer_manager()->GetFramebuffer(service_id); |
110 } | 106 } |
111 | 107 |
112 Renderbuffer* GetRenderbuffer( | 108 Renderbuffer* GetRenderbuffer( |
113 GLuint service_id) { | 109 GLuint service_id) { |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 }; | 634 }; |
639 | 635 |
640 // SpecializedSetup specializations that are needed in multiple unittest files. | 636 // SpecializedSetup specializations that are needed in multiple unittest files. |
641 template <> | 637 template <> |
642 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 638 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
643 | 639 |
644 } // namespace gles2 | 640 } // namespace gles2 |
645 } // namespace gpu | 641 } // namespace gpu |
646 | 642 |
647 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 643 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |