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

Issue 2345163002: Several minor improvements of DirectX capturer (Closed)

Created:
4 years, 3 months ago by Hzj_jie
Modified:
4 years, 2 months ago
Reviewers:
Sergey Ulanov, Jamie
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Several minor improvements of DirectX capturer 1. It looks like ComPtr cannot work well with vector::emplace_back, I got a consistent crash on one of my machine, but not the other. Move constructor should have no impact to lvalue reference, but I may be wrong here. The impact here is ComPtr released before it should be. So a simple solution is to use copy instead of reference. The D3dDevice is a collection of reference counted pointers (Microsoft::WRL::ComPtr), there is almost no extra cost. 2. Actively set several fields in D3D11_TEXTURE2D_DESC to avoid potential break if there are some platform changes later. 3. AcquireNextFrame returns both a DXGI_OUTDUPL_FRAME_INFO with AccumulatedFrames and an IDXGIResource. But there is no comment in MSDN to ensure IDXGIResource won't be nullptr if AccumulatedFrames > 0. Adding an extra check in DxgiOutputDuplicator makes it a safer. BUG=314516 Committed: https://crrev.com/66cadfc0e33f5368a86f2ebb52cc200a95c3ba1a Cr-Commit-Position: refs/heads/master@{#14341}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove DPI awareness changes #

Total comments: 13

Patch Set 3 : Resolve review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -20 lines) Patch
M webrtc/modules/desktop_capture/win/d3d_device.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/desktop_capture/win/d3d_device.cc View 1 2 3 chunks +4 lines, -5 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc View 1 2 3 chunks +7 lines, -5 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_texture_staging.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc View 1 2 4 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 43 (26 generated)
Hzj_jie
4 years, 3 months ago (2016-09-16 20:40:42 UTC) #11
Jamie
This feels like three unrelated changes. Even for simple changes like this, it's better to ...
4 years, 3 months ago (2016-09-16 21:54:10 UTC) #14
Hzj_jie
On 2016/09/16 21:54:10, Jamie wrote: > This feels like three unrelated changes. Even for simple ...
4 years, 3 months ago (2016-09-16 22:37:45 UTC) #18
Hzj_jie
https://codereview.chromium.org/2345163002/diff/80001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc File webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc (right): https://codereview.chromium.org/2345163002/diff/80001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc#newcode33 webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc:33: SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); On 2016/09/16 21:54:10, Jamie wrote: > According to ...
4 years, 3 months ago (2016-09-16 22:37:53 UTC) #19
Jamie
LGTM with nits. https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc File webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc (right): https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc#newcode152 webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc:152: resource) { Please add something to ...
4 years, 3 months ago (2016-09-17 00:49:30 UTC) #21
Hzj_jie
https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc File webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc (right): https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc#newcode152 webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc:152: resource) { On 2016/09/17 00:49:30, Jamie wrote: > Please ...
4 years, 3 months ago (2016-09-19 19:09:58 UTC) #23
Jamie
Still LGTM. https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h File webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h (right): https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h#newcode114 webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h:114: const D3dDevice device_; On 2016/09/19 19:09:57, Hzj_jie ...
4 years, 3 months ago (2016-09-19 19:16:07 UTC) #24
Sergey Ulanov
https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc File webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc (right): https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc#newcode65 webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc:65: _com_error error = device_.d3d_device()->CreateTexture2D( do you need _com_error here ...
4 years, 3 months ago (2016-09-19 22:15:19 UTC) #25
Hzj_jie
https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc File webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc (right): https://codereview.chromium.org/2345163002/diff/130001/webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc#newcode65 webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc:65: _com_error error = device_.d3d_device()->CreateTexture2D( On 2016/09/19 22:15:19, Sergey Ulanov ...
4 years, 3 months ago (2016-09-19 23:15:27 UTC) #26
Sergey Ulanov
lgtm
4 years, 2 months ago (2016-09-21 20:30:45 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2345163002/150001
4 years, 2 months ago (2016-09-21 21:05:38 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/8605)
4 years, 2 months ago (2016-09-21 21:10:57 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2345163002/150001
4 years, 2 months ago (2016-09-21 21:13:31 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 2 months ago (2016-09-21 23:06:13 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2345163002/150001
4 years, 2 months ago (2016-09-22 00:09:56 UTC) #39
commit-bot: I haz the power
Committed patchset #3 (id:150001)
4 years, 2 months ago (2016-09-22 00:19:14 UTC) #41
commit-bot: I haz the power
4 years, 2 months ago (2016-09-22 00:19:20 UTC) #43
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/66cadfc0e33f5368a86f2ebb52cc200a95c3ba1a
Cr-Commit-Position: refs/heads/master@{#14341}

Powered by Google App Engine
This is Rietveld 408576698