Index: gpu/command_buffer/common/id_allocator.h |
diff --git a/gpu/command_buffer/common/id_allocator.h b/gpu/command_buffer/common/id_allocator.h |
index b877083008ad724f515799283d66173215d03344..7f83a9c6691caefb911d15f4387c7619f127cd9a 100644 |
--- a/gpu/command_buffer/common/id_allocator.h |
+++ b/gpu/command_buffer/common/id_allocator.h |
@@ -36,12 +36,20 @@ class GPU_EXPORT IdAllocator { |
// Note: may wrap if it starts near limit. |
ResourceId AllocateIDAtOrAbove(ResourceId desired_id); |
+ // Allocates |range| amount of contiguous ids. |
+ // Returns the first id to |first_id| or |kInvalidResource| if |
+ // allocation failed. |
+ ResourceId AllocateIDRange(uint32_t range); |
+ |
// Marks an id as used. Returns false if id was already used. |
bool MarkAsUsed(ResourceId id); |
// Frees a resource ID. |
void FreeID(ResourceId id); |
+ // Frees a |range| amount of contiguous ids, starting from |first_id|. |
+ void FreeIDRange(ResourceId first_id, uint32_t range); |
+ |
// Checks whether or not a resource ID is in use. |
bool InUse(ResourceId id) const; |