| Index: gpu/command_buffer/common/id_allocator.cc
|
| ===================================================================
|
| --- gpu/command_buffer/common/id_allocator.cc (revision 95161)
|
| +++ gpu/command_buffer/common/id_allocator.cc (working copy)
|
| @@ -9,6 +9,9 @@
|
|
|
| namespace gpu {
|
|
|
| +IdAllocatorInterface::~IdAllocatorInterface() {
|
| +}
|
| +
|
| IdAllocator::IdAllocator() {}
|
|
|
| IdAllocator::~IdAllocator() {}
|
| @@ -85,4 +88,34 @@
|
| return id;
|
| }
|
|
|
| +NonReusedIdAllocator::NonReusedIdAllocator() : last_id_(0) {
|
| +}
|
| +
|
| +NonReusedIdAllocator::~NonReusedIdAllocator() {
|
| +}
|
| +
|
| +ResourceId NonReusedIdAllocator::AllocateID() {
|
| + return ++last_id_;
|
| +}
|
| +
|
| +ResourceId NonReusedIdAllocator::AllocateIDAtOrAbove(ResourceId desired_id) {
|
| + if (desired_id > last_id_)
|
| + last_id_ = desired_id;
|
| +
|
| + return ++last_id_;
|
| +}
|
| +
|
| +bool NonReusedIdAllocator::MarkAsUsed(ResourceId id) {
|
| + GPU_NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| +void NonReusedIdAllocator::FreeID(ResourceId id) {
|
| +}
|
| +
|
| +bool NonReusedIdAllocator::InUse(ResourceId id) const {
|
| + GPU_NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| } // namespace gpu
|
|
|