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

Issue 793993002: Use InterlockedAdd(0) to get the current state in DXVAVideoDecodeAccelerator::GetState (Closed)

Created:
6 years ago by ananta
Modified:
6 years ago
Reviewers:
DaleCurtis, brucedawson
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Restore DXVAVideoDecodeAccelerator::SetState to continue setting the state on the main thread. DXVAVideoDecodeAccelerator::GetState uses InterlockedAdd(0) to get the recent state. BUG=441000 Committed: https://crrev.com/fc1bdb4f2b45cb771e227238241646ac18d249ca Cr-Commit-Position: refs/heads/master@{#308245}

Patch Set 1 #

Patch Set 2 : Update comment #

Patch Set 3 : Use InterlockedAdd(0) in GetState #

Total comments: 2

Patch Set 4 : Added DCHECK for size of state #

Total comments: 2

Patch Set 5 : Use static_assert for type size #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -23 lines) Patch
M content/common/gpu/media/dxva_video_decode_accelerator.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/gpu/media/dxva_video_decode_accelerator.cc View 1 2 3 4 1 chunk +22 lines, -21 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
ananta
6 years ago (2014-12-11 01:09:57 UTC) #2
DaleCurtis
This is only marginally better than what you have now; all code using the state ...
6 years ago (2014-12-11 20:52:12 UTC) #3
brucedawson
I'm commenting on the latest revisions, which use InterlockedAdd(0) and InterlockedExchange, whereas DaleCurtis@ commented on ...
6 years ago (2014-12-12 00:31:22 UTC) #6
brucedawson
https://codereview.chromium.org/793993002/diff/60001/content/common/gpu/media/dxva_video_decode_accelerator.cc File content/common/gpu/media/dxva_video_decode_accelerator.cc (right): https://codereview.chromium.org/793993002/diff/60001/content/common/gpu/media/dxva_video_decode_accelerator.cc#newcode1462 content/common/gpu/media/dxva_video_decode_accelerator.cc:1462: InterlockedAdd(reinterpret_cast<volatile long*>(&state_), 0)); When doing a reinterpret_cast between State* ...
6 years ago (2014-12-12 18:56:29 UTC) #7
ananta
https://codereview.chromium.org/793993002/diff/60001/content/common/gpu/media/dxva_video_decode_accelerator.cc File content/common/gpu/media/dxva_video_decode_accelerator.cc (right): https://codereview.chromium.org/793993002/diff/60001/content/common/gpu/media/dxva_video_decode_accelerator.cc#newcode1462 content/common/gpu/media/dxva_video_decode_accelerator.cc:1462: InterlockedAdd(reinterpret_cast<volatile long*>(&state_), 0)); On 2014/12/12 18:56:29, brucedawson wrote: > ...
6 years ago (2014-12-12 19:59:07 UTC) #8
brucedawson
https://codereview.chromium.org/793993002/diff/80001/content/common/gpu/media/dxva_video_decode_accelerator.cc File content/common/gpu/media/dxva_video_decode_accelerator.cc (right): https://codereview.chromium.org/793993002/diff/80001/content/common/gpu/media/dxva_video_decode_accelerator.cc#newcode1461 content/common/gpu/media/dxva_video_decode_accelerator.cc:1461: DCHECK(sizeof(State) == sizeof(long)); You shouldn't use DCHECK here -- ...
6 years ago (2014-12-12 20:50:18 UTC) #9
ananta
https://codereview.chromium.org/793993002/diff/80001/content/common/gpu/media/dxva_video_decode_accelerator.cc File content/common/gpu/media/dxva_video_decode_accelerator.cc (right): https://codereview.chromium.org/793993002/diff/80001/content/common/gpu/media/dxva_video_decode_accelerator.cc#newcode1461 content/common/gpu/media/dxva_video_decode_accelerator.cc:1461: DCHECK(sizeof(State) == sizeof(long)); On 2014/12/12 20:50:18, brucedawson wrote: > ...
6 years ago (2014-12-12 20:58:59 UTC) #10
brucedawson
lgtm
6 years ago (2014-12-12 21:01:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/793993002/100001
6 years ago (2014-12-13 00:13:18 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/18009)
6 years ago (2014-12-13 02:59:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/793993002/100001
6 years ago (2014-12-13 03:00:38 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:100001)
6 years ago (2014-12-13 03:52:55 UTC) #18
commit-bot: I haz the power
6 years ago (2014-12-13 03:53:39 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/fc1bdb4f2b45cb771e227238241646ac18d249ca
Cr-Commit-Position: refs/heads/master@{#308245}

Powered by Google App Engine
This is Rietveld 408576698