summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/command_buffer/service/buffer_manager.h4
-rw-r--r--gpu/command_buffer/service/context_group.h4
-rw-r--r--gpu/command_buffer/service/framebuffer_manager.h7
-rw-r--r--gpu/command_buffer/service/id_manager.h7
-rw-r--r--gpu/command_buffer/service/renderbuffer_manager.h5
-rw-r--r--gpu/command_buffer/service/shader_manager.h4
-rw-r--r--gpu/command_buffer/service/shader_translator.h4
-rw-r--r--gpu/command_buffer/service/texture_manager.h5
8 files changed, 18 insertions, 22 deletions
diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h
index 357ac27..6569116 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -7,6 +7,7 @@
#include <map>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -172,8 +173,7 @@ class BufferManager {
private:
// Info for each buffer in the system.
- // TODO(gman): Choose a faster container.
- typedef std::map<GLuint, BufferInfo::Ref> BufferInfoMap;
+ typedef base::hash_map<GLuint, BufferInfo::Ref> BufferInfoMap;
BufferInfoMap buffer_infos_;
// Whether or not buffers can be bound to multiple targets.
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 156099d..9bd3a58 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -5,9 +5,9 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
#define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
-#include <map>
#include <string>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -133,7 +133,7 @@ class ContextGroup : public base::RefCounted<ContextGroup> {
scoped_ptr<ShaderManager> shader_manager_;
- typedef std::map<uint32, linked_ptr<IdAllocator> > IdAllocatorMap;
+ typedef base::hash_map<uint32, linked_ptr<IdAllocator> > IdAllocatorMap;
IdAllocatorMap id_namespaces_;
FeatureInfo feature_info_;
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h
index 13953df..362e0b8 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -5,8 +5,8 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
-#include <map>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/gl_utils.h"
@@ -96,7 +96,7 @@ class FramebufferManager {
bool has_been_bound_;
// A map of attachments.
- typedef std::map<GLenum, Attachment::Ref> AttachmentMap;
+ typedef base::hash_map<GLenum, Attachment::Ref> AttachmentMap;
AttachmentMap attachments_;
DISALLOW_COPY_AND_ASSIGN(FramebufferInfo);
@@ -122,8 +122,7 @@ class FramebufferManager {
private:
// Info for each framebuffer in the system.
- // TODO(gman): Choose a faster container.
- typedef std::map<GLuint, FramebufferInfo::Ref> FramebufferInfoMap;
+ typedef base::hash_map<GLuint, FramebufferInfo::Ref> FramebufferInfoMap;
FramebufferInfoMap framebuffer_infos_;
DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
diff --git a/gpu/command_buffer/service/id_manager.h b/gpu/command_buffer/service/id_manager.h
index 25e6ac0..3668534 100644
--- a/gpu/command_buffer/service/id_manager.h
+++ b/gpu/command_buffer/service/id_manager.h
@@ -1,12 +1,12 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GPU_COMMAND_BUFFER_SERVICE_ID_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_ID_MANAGER_H_
-#include <map>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "gpu/command_buffer/service/gl_utils.h"
namespace gpu {
@@ -37,8 +37,7 @@ class IdManager {
bool GetClientId(GLuint service_id, GLuint* client_id);
private:
- // TODO(gman): Replace with faster implementation.
- typedef std::map<GLuint, GLuint> MapType;
+ typedef base::hash_map<GLuint, GLuint> MapType;
MapType id_map_;
DISALLOW_COPY_AND_ASSIGN(IdManager);
diff --git a/gpu/command_buffer/service/renderbuffer_manager.h b/gpu/command_buffer/service/renderbuffer_manager.h
index af9ce17..98389c9 100644
--- a/gpu/command_buffer/service/renderbuffer_manager.h
+++ b/gpu/command_buffer/service/renderbuffer_manager.h
@@ -5,8 +5,8 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_RENDERBUFFER_MANAGER_H_
-#include <map>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/gl_utils.h"
@@ -138,8 +138,7 @@ class RenderbufferManager {
GLint max_renderbuffer_size_;
// Info for each renderbuffer in the system.
- // TODO(gman): Choose a faster container.
- typedef std::map<GLuint, RenderbufferInfo::Ref> RenderbufferInfoMap;
+ typedef base::hash_map<GLuint, RenderbufferInfo::Ref> RenderbufferInfoMap;
RenderbufferInfoMap renderbuffer_infos_;
DISALLOW_COPY_AND_ASSIGN(RenderbufferManager);
diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h
index c0f8e68..d1091c6 100644
--- a/gpu/command_buffer/service/shader_manager.h
+++ b/gpu/command_buffer/service/shader_manager.h
@@ -5,9 +5,9 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_SHADER_MANAGER_H_
-#include <map>
#include <string>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -139,7 +139,7 @@ class ShaderManager {
private:
// Info for each shader by service side shader Id.
- typedef std::map<GLuint, ShaderInfo::Ref> ShaderInfoMap;
+ typedef base::hash_map<GLuint, ShaderInfo::Ref> ShaderInfoMap;
ShaderInfoMap shader_infos_;
void RemoveShaderInfoIfUnused(ShaderInfo* info);
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h
index 857c46d..7e89e8d 100644
--- a/gpu/command_buffer/service/shader_translator.h
+++ b/gpu/command_buffer/service/shader_translator.h
@@ -5,10 +5,10 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
#define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
-#include <map>
#include <string>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/angle/include/GLSLANG/ShaderLang.h"
@@ -53,7 +53,7 @@ class ShaderTranslatorInterface {
int size;
};
// Mapping between variable name and info.
- typedef std::map<std::string, VariableInfo> VariableMap;
+ typedef base::hash_map<std::string, VariableInfo> VariableMap;
virtual const VariableMap& attrib_map() const = 0;
virtual const VariableMap& uniform_map() const = 0;
};
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index fd74a7d..6b7ff12 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -5,9 +5,9 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
-#include <map>
#include <vector>
#include "base/basictypes.h"
+#include "base/hash_tables.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "gpu/command_buffer/service/gl_utils.h"
@@ -338,8 +338,7 @@ class TextureManager {
private:
// Info for each texture in the system.
- // TODO(gman): Choose a faster container.
- typedef std::map<GLuint, TextureInfo::Ref> TextureInfoMap;
+ typedef base::hash_map<GLuint, TextureInfo::Ref> TextureInfoMap;
TextureInfoMap texture_infos_;
GLsizei max_texture_size_;