summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/id_allocator.h
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 00:11:25 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 00:11:25 +0000
commita7a27ace0760f1ed19016822a45c6ec5300e861c (patch)
treeb7641f10c9fb3130c0ae8f50e7223db2ae722cda /gpu/command_buffer/client/id_allocator.h
parent82017272e7272182443d7054911c4f890346353e (diff)
downloadchromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.zip
chromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.tar.gz
chromium_src-a7a27ace0760f1ed19016822a45c6ec5300e861c.tar.bz2
Added CommandBufferProxy, CommandBufferStub. Replaced NPAPI with IPC for synchronous messages. WebPluginDelegateImpl can instantiate a command buffer. Removed remaining dependencies on NPAPI.
TEST=none BUG=none Review URL: http://codereview.chromium.org/465040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/id_allocator.h')
-rw-r--r--gpu/command_buffer/client/id_allocator.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gpu/command_buffer/client/id_allocator.h b/gpu/command_buffer/client/id_allocator.h
index b2b14b9..52c448c2 100644
--- a/gpu/command_buffer/client/id_allocator.h
+++ b/gpu/command_buffer/client/id_allocator.h
@@ -32,15 +32,15 @@
// This file contains the definition of the IdAllocator class.
-#ifndef GPU_COMMAND_BUFFER_CLIENT_CROSS_ID_ALLOCATOR_H_
-#define GPU_COMMAND_BUFFER_CLIENT_CROSS_ID_ALLOCATOR_H_
+#ifndef GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_
+#define GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_
#include <vector>
#include "base/basictypes.h"
#include "gpu/command_buffer/common/types.h"
#include "gpu/command_buffer/common/resource.h"
-namespace command_buffer {
+namespace gpu {
// A class to manage the allocation of resource IDs. It uses a bitfield stored
// into a vector of unsigned ints.
@@ -49,19 +49,19 @@ class IdAllocator {
IdAllocator();
// Allocates a new resource ID.
- command_buffer::ResourceId AllocateID() {
+ gpu::ResourceId AllocateID() {
unsigned int bit = FindFirstFree();
SetBit(bit, true);
return bit;
}
// Frees a resource ID.
- void FreeID(command_buffer::ResourceId id) {
+ void FreeID(gpu::ResourceId id) {
SetBit(id, false);
}
// Checks whether or not a resource ID is in use.
- bool InUse(command_buffer::ResourceId id) {
+ bool InUse(gpu::ResourceId id) {
return GetBit(id);
}
private:
@@ -73,6 +73,6 @@ class IdAllocator {
DISALLOW_COPY_AND_ASSIGN(IdAllocator);
};
-} // namespace command_buffer
+} // namespace gpu
-#endif // GPU_COMMAND_BUFFER_CLIENT_CROSS_ID_ALLOCATOR_H_
+#endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_