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

Issue 692073002: command_buffer: Implement IdAllocator by recording ranges (Closed)

Created:
6 years, 1 month ago by Kimmo Kinnunen
Modified:
5 years, 9 months ago
Reviewers:
David Yen, vmiura
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

command_buffer: Implement IdAllocator by recording ranges 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 Committed: https://crrev.com/04747ceb17fa2d7ed457e59faee01218257d9abb Cr-Commit-Position: refs/heads/master@{#318663}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 7

Patch Set 3 : address review comments #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+296 lines, -61 lines) Patch
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M gpu/command_buffer/common/id_allocator.h View 1 2 chunks +12 lines, -11 lines 0 comments Download
M gpu/command_buffer/common/id_allocator.cc View 1 2 1 chunk +164 lines, -48 lines 0 comments Download
M gpu/command_buffer/common/id_allocator_test.cc View 1 2 1 chunk +119 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
Kimmo Kinnunen
Alternative to https://codereview.chromium.org/684093008/ , if it is preferred to use more tested std::map implementation instead ...
6 years, 1 month ago (2014-10-31 13:56:51 UTC) #1
David Yen
On 2014/10/31 13:56:51, Kimmo Kinnunen wrote: > Alternative to https://codereview.chromium.org/684093008/ , if it is preferred ...
5 years, 11 months ago (2015-01-15 23:24:59 UTC) #3
Kimmo Kinnunen
On 2015/01/15 23:24:59, David Yen wrote: > On 2014/10/31 13:56:51, Kimmo Kinnunen wrote: > > ...
5 years, 11 months ago (2015-01-16 13:59:19 UTC) #4
Kimmo Kinnunen
> On 2015/01/15 23:24:59, David Yen wrote: > > Is this ready to be reviewed? ...
5 years, 11 months ago (2015-01-19 14:09:02 UTC) #5
vmiura
LGTM. David I've checked this as thoroughly as I could but please also take a ...
5 years, 10 months ago (2015-02-04 07:31:55 UTC) #6
vmiura
https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc File gpu/command_buffer/common/id_allocator.cc (right): https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc#newcode193 gpu/command_buffer/common/id_allocator.cc:193: DCHECK(id); Should we return true if (id == kInvalidResource) ...
5 years, 10 months ago (2015-02-04 07:32:56 UTC) #7
Kimmo Kinnunen
https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc File gpu/command_buffer/common/id_allocator.cc (right): https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc#newcode193 gpu/command_buffer/common/id_allocator.cc:193: DCHECK(id); On 2015/02/04 07:32:56, vmiura wrote: > Should we ...
5 years, 10 months ago (2015-02-04 08:13:09 UTC) #8
Kimmo Kinnunen
On 2015/02/04 08:13:09, Kimmo Kinnunen wrote: > for any id: > Free(id); > expect(InUse(id) == ...
5 years, 10 months ago (2015-02-04 08:35:34 UTC) #9
vmiura
On 2015/02/04 08:35:34, Kimmo Kinnunen wrote: > On 2015/02/04 08:13:09, Kimmo Kinnunen wrote: > > ...
5 years, 10 months ago (2015-02-04 16:32:45 UTC) #10
David Yen
lgtm with nits. https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc File gpu/command_buffer/common/id_allocator.cc (right): https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc#newcode29 gpu/command_buffer/common/id_allocator.cc:29: DCHECK(desired_id > 0u); Nit: Even though ...
5 years, 10 months ago (2015-02-04 22:57:16 UTC) #11
Kimmo Kinnunen
https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc File gpu/command_buffer/common/id_allocator.cc (right): https://codereview.chromium.org/692073002/diff/20001/gpu/command_buffer/common/id_allocator.cc#newcode29 gpu/command_buffer/common/id_allocator.cc:29: DCHECK(desired_id > 0u); On 2015/02/04 22:57:16, David Yen wrote: ...
5 years, 10 months ago (2015-02-05 08:29:33 UTC) #13
vmiura
> > Should we return true if (id == kInvalidResource) instead to match the old ...
5 years, 10 months ago (2015-02-12 07:24:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/692073002/60001
5 years, 9 months ago (2015-03-02 06:53:15 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-02 08:02:27 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-02 08:03:22 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/04747ceb17fa2d7ed457e59faee01218257d9abb
Cr-Commit-Position: refs/heads/master@{#318663}

Powered by Google App Engine
This is Rietveld 408576698