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 8eeaf531d66eb2aececf708772220cf663e2ab6f..afb36af74f50b490e9950ef4e8b37c8994d38e83 100644 |
--- a/gpu/command_buffer/service/context_group.h |
+++ b/gpu/command_buffer/service/context_group.h |
@@ -216,6 +216,24 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
transformfeedbacks_id_map_.erase(client_id); |
} |
+ void AddSyncId(GLuint client_id, GLsync service_id) { |
+ syncs_id_map_[client_id] = service_id; |
+ } |
+ |
+ bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const { |
+ std::map<GLuint, GLsync>::const_iterator iter = |
+ syncs_id_map_.find(client_id); |
+ if (iter == syncs_id_map_.end()) |
+ return false; |
+ if (service_id) |
+ *service_id = iter->second; |
+ return true; |
+ } |
+ |
+ void RemoveSyncId(GLuint client_id) { |
+ syncs_id_map_.erase(client_id); |
+ } |
+ |
private: |
friend class base::RefCounted<ContextGroup>; |
~ContextGroup(); |
@@ -269,6 +287,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_; |
+ std::map<GLuint, GLsync> syncs_id_map_; |
piman
2015/01/22 00:49:32
nit: by the way, could all these be hash_maps inst
Zhenyao Mo
2015/01/22 01:12:57
Done.
|
GLenum draw_buffer_; |