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

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

Issue 1145103006: BindTransformFeedback(0) is legal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTEXT_GROUP_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void RemoveSamplerId(GLuint client_id) { 195 void RemoveSamplerId(GLuint client_id) {
196 samplers_id_map_.erase(client_id); 196 samplers_id_map_.erase(client_id);
197 } 197 }
198 198
199 void AddTransformFeedbackId(GLuint client_id, GLuint service_id) { 199 void AddTransformFeedbackId(GLuint client_id, GLuint service_id) {
200 transformfeedbacks_id_map_[client_id] = service_id; 200 transformfeedbacks_id_map_[client_id] = service_id;
201 } 201 }
202 202
203 bool GetTransformFeedbackServiceId( 203 bool GetTransformFeedbackServiceId(
204 GLuint client_id, GLuint* service_id) const { 204 GLuint client_id, GLuint* service_id) const {
205 if (client_id == 0) {
206 // Default one.
207 if (service_id)
208 *service_id = 0;
209 return true;
210 }
205 base::hash_map<GLuint, GLuint>::const_iterator iter = 211 base::hash_map<GLuint, GLuint>::const_iterator iter =
206 transformfeedbacks_id_map_.find(client_id); 212 transformfeedbacks_id_map_.find(client_id);
207 if (iter == transformfeedbacks_id_map_.end()) 213 if (iter == transformfeedbacks_id_map_.end())
208 return false; 214 return false;
209 if (service_id) 215 if (service_id)
210 *service_id = iter->second; 216 *service_id = iter->second;
211 return true; 217 return true;
212 } 218 }
213 219
214 void RemoveTransformFeedbackId(GLuint client_id) { 220 void RemoveTransformFeedbackId(GLuint client_id) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 298
293 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 299 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
294 }; 300 };
295 301
296 } // namespace gles2 302 } // namespace gles2
297 } // namespace gpu 303 } // namespace gpu
298 304
299 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 305 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
300 306
301 307
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698