Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h

Issue 2435803004: Initialize buffers before allowing access to them. (Closed)
Patch Set: win failure Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 service_id) { 107 Buffer* GetBuffer(GLuint client_id) {
108 return group_->buffer_manager()->GetBuffer(service_id); 108 return group_->buffer_manager()->GetBuffer(client_id);
109 } 109 }
110 110
111 Framebuffer* GetFramebuffer(GLuint service_id) { 111 Framebuffer* GetFramebuffer(GLuint client_id) {
112 return group_->framebuffer_manager()->GetFramebuffer(service_id); 112 return group_->framebuffer_manager()->GetFramebuffer(client_id);
113 } 113 }
114 114
115 Renderbuffer* GetRenderbuffer( 115 Renderbuffer* GetRenderbuffer(GLuint client_id) {
116 GLuint service_id) { 116 return group_->renderbuffer_manager()->GetRenderbuffer(client_id);
117 return group_->renderbuffer_manager()->GetRenderbuffer(service_id);
118 } 117 }
119 118
120 TextureRef* GetTexture(GLuint client_id) { 119 TextureRef* GetTexture(GLuint client_id) {
121 return group_->texture_manager()->GetTexture(client_id); 120 return group_->texture_manager()->GetTexture(client_id);
122 } 121 }
123 122
124 Shader* GetShader(GLuint client_id) { 123 Shader* GetShader(GLuint client_id) {
125 return group_->shader_manager()->GetShader(client_id); 124 return group_->shader_manager()->GetShader(client_id);
126 } 125 }
127 126
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 if (arg[i] != array[i]) 776 if (arg[i] != array[i])
778 return false; 777 return false;
779 } 778 }
780 return true; 779 return true;
781 } 780 }
782 781
783 } // namespace gles2 782 } // namespace gles2
784 } // namespace gpu 783 } // namespace gpu
785 784
786 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 785 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698