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

Unified Diff: gpu/command_buffer/client/id_allocator.h

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « gpu/command_buffer/client/gles2_lib.cc ('k') | gpu/command_buffer/client/id_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/id_allocator.h
===================================================================
--- gpu/command_buffer/client/id_allocator.h (revision 34314)
+++ gpu/command_buffer/client/id_allocator.h (working copy)
@@ -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 @@
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 @@
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_
« no previous file with comments | « gpu/command_buffer/client/gles2_lib.cc ('k') | gpu/command_buffer/client/id_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698