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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 T GetSharedMemoryAs() { | 97 T GetSharedMemoryAs() { |
98 return reinterpret_cast<T>(shared_memory_address_); | 98 return reinterpret_cast<T>(shared_memory_address_); |
99 } | 99 } |
100 | 100 |
101 template <typename T> | 101 template <typename T> |
102 T GetSharedMemoryAsWithOffset(uint32_t offset) { | 102 T GetSharedMemoryAsWithOffset(uint32_t offset) { |
103 void* ptr = reinterpret_cast<int8_t*>(shared_memory_address_) + offset; | 103 void* ptr = reinterpret_cast<int8_t*>(shared_memory_address_) + offset; |
104 return reinterpret_cast<T>(ptr); | 104 return reinterpret_cast<T>(ptr); |
105 } | 105 } |
106 | 106 |
107 Buffer* GetBuffer(GLuint client_id) { | 107 Buffer* GetBuffer(GLuint service_id) { |
108 return group_->buffer_manager()->GetBuffer(client_id); | 108 return group_->buffer_manager()->GetBuffer(service_id); |
109 } | 109 } |
110 | 110 |
111 Framebuffer* GetFramebuffer(GLuint client_id) { | 111 Framebuffer* GetFramebuffer(GLuint service_id) { |
112 return group_->framebuffer_manager()->GetFramebuffer(client_id); | 112 return group_->framebuffer_manager()->GetFramebuffer(service_id); |
113 } | 113 } |
114 | 114 |
115 Renderbuffer* GetRenderbuffer(GLuint client_id) { | 115 Renderbuffer* GetRenderbuffer( |
116 return group_->renderbuffer_manager()->GetRenderbuffer(client_id); | 116 GLuint service_id) { |
| 117 return group_->renderbuffer_manager()->GetRenderbuffer(service_id); |
117 } | 118 } |
118 | 119 |
119 TextureRef* GetTexture(GLuint client_id) { | 120 TextureRef* GetTexture(GLuint client_id) { |
120 return group_->texture_manager()->GetTexture(client_id); | 121 return group_->texture_manager()->GetTexture(client_id); |
121 } | 122 } |
122 | 123 |
123 Shader* GetShader(GLuint client_id) { | 124 Shader* GetShader(GLuint client_id) { |
124 return group_->shader_manager()->GetShader(client_id); | 125 return group_->shader_manager()->GetShader(client_id); |
125 } | 126 } |
126 | 127 |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 if (arg[i] != array[i]) | 777 if (arg[i] != array[i]) |
777 return false; | 778 return false; |
778 } | 779 } |
779 return true; | 780 return true; |
780 } | 781 } |
781 | 782 |
782 } // namespace gles2 | 783 } // namespace gles2 |
783 } // namespace gpu | 784 } // namespace gpu |
784 | 785 |
785 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 786 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |