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

Unified Diff: gpu/command_buffer/service/context_group.h

Issue 795243002: Add TransformFeedback related APIs to command buffer: PART I. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/context_group.h
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 7477674af60c5a585ab51e09784659ac7a7957f1..f695a3e1a81d429a965abbea62f288a05b13552f 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -193,6 +193,25 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
samplers_id_map_.erase(client_id);
}
+ void AddTransformFeedbackId(GLuint client_id, GLuint service_id) {
+ transformfeedbacks_id_map_[client_id] = service_id;
+ }
+
+ bool GetTransformFeedbackServiceId(
+ GLuint client_id, GLuint* service_id) const {
+ std::map<GLuint, GLuint>::const_iterator iter =
+ transformfeedbacks_id_map_.find(client_id);
+ if (iter == transformfeedbacks_id_map_.end())
+ return false;
+ if (service_id)
+ *service_id = iter->second;
+ return true;
+ }
+
+ void RemoveTransformFeedbackId(GLuint client_id) {
+ transformfeedbacks_id_map_.erase(client_id);
+ }
+
private:
friend class base::RefCounted<ContextGroup>;
~ContextGroup();
@@ -244,6 +263,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
// Mappings from client side IDs to service side IDs.
std::map<GLuint, GLuint> samplers_id_map_;
+ std::map<GLuint, GLuint> transformfeedbacks_id_map_;
GLenum draw_buffer_;

Powered by Google App Engine
This is Rietveld 408576698