• kkinnunen's avatar
    command_buffer: Implement IdAllocator by recording ranges · 04747ceb
    kkinnunen authored
    Implement IdAllocator by storing complete id ranges of (min,max) in the
    map instead of just ids. This should make allocating big amount of ids
    scale a bit better.
    
    Store a range by creating a mapping first id -> last id. Upon query of
    id existence, find the lowest_bound with the id interested. The hit will
    be found at the returned iterator position (range starts at the id) or
    the position before (range starts before the id and expands to cover
    it).
    
    Changes the allocation results so that even though client has requested
    AllocateIdAtOrAbove(high_id_number), the next AllocateId() will allocate
    lowest available id (instead of lowest available after
    high_id_number). This is why GLES2ImplementationTest::kBuffersStartId
    changes.
    
    BUG=344330
    
    Review URL: https://codereview.chromium.org/692073002
    
    Cr-Commit-Position: refs/heads/master@{#318663}
    04747ceb
id_allocator_test.cc 8.23 KB