summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/context_group.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-03 22:49:57 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-03 22:49:57 +0000
commit3b1ecc26f9030a105858477a2147a76fcfa6d628 (patch)
tree3ff5ef3f0ab6e7742500b3072a26de18bfde9340 /gpu/command_buffer/service/context_group.h
parent066957fe6d4b9be3d5921b37249af5ba45451c7a (diff)
downloadchromium_src-3b1ecc26f9030a105858477a2147a76fcfa6d628.zip
chromium_src-3b1ecc26f9030a105858477a2147a76fcfa6d628.tar.gz
chromium_src-3b1ecc26f9030a105858477a2147a76fcfa6d628.tar.bz2
Implemented support for GL context share groups in the renderer process.I put all compositor and canvas contexts in the same share group so they can share IDs.
Review URL: http://codereview.chromium.org/7554015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/context_group.h')
-rw-r--r--gpu/command_buffer/service/context_group.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 9bd3a58..a2e6382 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -11,12 +11,13 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/service/gles2_cmd_validation.h"
#include "gpu/command_buffer/service/feature_info.h"
namespace gpu {
-class IdAllocator;
+class IdAllocatorInterface;
namespace gles2 {
@@ -103,7 +104,7 @@ class ContextGroup : public base::RefCounted<ContextGroup> {
return shader_manager_.get();
}
- IdAllocator* GetIdAllocator(unsigned namepsace_id);
+ IdAllocatorInterface* GetIdAllocator(unsigned namespace_id);
private:
// Destroys all the resources.
@@ -133,8 +134,8 @@ class ContextGroup : public base::RefCounted<ContextGroup> {
scoped_ptr<ShaderManager> shader_manager_;
- typedef base::hash_map<uint32, linked_ptr<IdAllocator> > IdAllocatorMap;
- IdAllocatorMap id_namespaces_;
+ linked_ptr<IdAllocatorInterface>
+ id_namespaces_[id_namespaces::kNumIdNamespaces];
FeatureInfo feature_info_;