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

Issue 2154473003: Simplify locking in HRTFDatabaseLoader (Closed)

Created:
4 years, 5 months ago by Raymond Toy
Modified:
4 years, 5 months ago
Reviewers:
hongchan
CC:
chromium-reviews, blink-reviews, hongchan, Raymond Toy
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify locking in HRTFDatabaseLoader The locks in loadTask() and loadAsynchronously() were blocking each other for about 100 msec or more, causing the jank in the bug report. Only the lock is loadTask() is needed because that's what writes the m_hrtfDatabase pointer. loadAsynchronously() doesn't need a lock because it doesn't need to read m_hrtfDatabase. Also simplified isLoaded() and database() which basically do the same thing except for the return type. database() (and, indirectly, isLoaded()) also gets a tryLock because it is called from the audio thread which can't block. BUG=602668 TEST=No jank in test in 602668 Committed: https://crrev.com/0494c3815a7eebceb73234e8da9e368e97fc1bfb Cr-Commit-Position: refs/heads/master@{#406389}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix typos. #

Patch Set 3 : Address review comments #

Patch Set 4 : Add comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -21 lines) Patch
M third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h View 1 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp View 1 2 3 2 chunks +31 lines, -18 lines 0 comments Download

Messages

Total messages: 18 (11 generated)
hongchan
https://codereview.chromium.org/2154473003/diff/1/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp File third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp (right): https://codereview.chromium.org/2154473003/diff/1/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp#newcode79 third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp:79: ASSERT(!isMainThread()); I don't mind changing this to DCHECK. https://codereview.chromium.org/2154473003/diff/1/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp#newcode96 ...
4 years, 5 months ago (2016-07-15 16:19:00 UTC) #6
Raymond Toy
https://codereview.chromium.org/2154473003/diff/1/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp File third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp (right): https://codereview.chromium.org/2154473003/diff/1/third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp#newcode96 third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.cpp:96: m_thread = wrapUnique(Platform::current()->createThread("HRTF database loader")); On 2016/07/15 16:19:00, hoch ...
4 years, 5 months ago (2016-07-15 16:27:07 UTC) #7
hongchan
lgtm
4 years, 5 months ago (2016-07-19 20:10:15 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2154473003/60001
4 years, 5 months ago (2016-07-19 20:21:05 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-19 21:45:08 UTC) #15
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 21:45:09 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 21:47:59 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/0494c3815a7eebceb73234e8da9e368e97fc1bfb
Cr-Commit-Position: refs/heads/master@{#406389}

Powered by Google App Engine
This is Rietveld 408576698