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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 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 1e56829ce7c913105b9ba8ca83a79ae15738d5ab..63e9a34094fbbc3fb076d44c8068df6f9517eca2 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -177,6 +177,24 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
draw_buffer_ = buf;
}
+ void AddBufferId(GLuint client_id, GLuint service_id) {
+ buffers_id_map_[client_id] = service_id;
+ }
+
+ bool GetBufferServiceId(GLuint client_id, GLuint* service_id) const {
+ std::map<GLuint, GLuint>::const_iterator iter =
+ buffers_id_map_.find(client_id);
+ if (iter == buffers_id_map_.end())
+ return false;
+ if (service_id)
+ *service_id = iter->second;
+ return true;
+ }
+
+ void RemoveBufferId(GLuint client_id) {
+ buffers_id_map_.erase(client_id);
+ }
+
void AddSamplerId(GLuint client_id, GLuint service_id) {
samplers_id_map_[client_id] = service_id;
}
@@ -265,6 +283,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_;
// Mappings from client side IDs to service side IDs.
+ std::map<GLuint, GLuint> buffers_id_map_;
std::map<GLuint, GLuint> samplers_id_map_;
std::map<GLuint, GLuint> transformfeedbacks_id_map_;
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_clear_framebuffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698