| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.h" |
| 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 T GetSharedMemoryAs() { | 121 T GetSharedMemoryAs() { |
| 122 return reinterpret_cast<T>(shared_memory_address_); | 122 return reinterpret_cast<T>(shared_memory_address_); |
| 123 } | 123 } |
| 124 | 124 |
| 125 template <typename T> | 125 template <typename T> |
| 126 T GetSharedMemoryAsWithOffset(uint32 offset) { | 126 T GetSharedMemoryAsWithOffset(uint32 offset) { |
| 127 void* ptr = reinterpret_cast<int8*>(shared_memory_address_) + offset; | 127 void* ptr = reinterpret_cast<int8*>(shared_memory_address_) + offset; |
| 128 return reinterpret_cast<T>(ptr); | 128 return reinterpret_cast<T>(ptr); |
| 129 } | 129 } |
| 130 | 130 |
| 131 IdAllocator* GetIdAllocator(GLuint namespace_id) { | 131 IdAllocatorInterface* GetIdAllocator(GLuint namespace_id) { |
| 132 return group_->GetIdAllocator(namespace_id); | 132 return group_->GetIdAllocator(namespace_id); |
| 133 } | 133 } |
| 134 | 134 |
| 135 BufferManager::BufferInfo* GetBufferInfo(GLuint service_id) { | 135 BufferManager::BufferInfo* GetBufferInfo(GLuint service_id) { |
| 136 return group_->buffer_manager()->GetBufferInfo(service_id); | 136 return group_->buffer_manager()->GetBufferInfo(service_id); |
| 137 } | 137 } |
| 138 | 138 |
| 139 FramebufferManager::FramebufferInfo* GetFramebufferInfo(GLuint service_id) { | 139 FramebufferManager::FramebufferInfo* GetFramebufferInfo(GLuint service_id) { |
| 140 return group_->framebuffer_manager()->GetFramebufferInfo(service_id); | 140 return group_->framebuffer_manager()->GetFramebufferInfo(service_id); |
| 141 } | 141 } |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 void DeleteIndexBuffer(); | 416 void DeleteIndexBuffer(); |
| 417 | 417 |
| 418 GLuint client_vertex_shader_id_; | 418 GLuint client_vertex_shader_id_; |
| 419 GLuint client_fragment_shader_id_; | 419 GLuint client_fragment_shader_id_; |
| 420 }; | 420 }; |
| 421 | 421 |
| 422 } // namespace gles2 | 422 } // namespace gles2 |
| 423 } // namespace gpu | 423 } // namespace gpu |
| 424 | 424 |
| 425 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 425 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| OLD | NEW |