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

Issue 2788863006: Merge ScreenCapturerWinDirectx::frames_ and contexts_ (Closed)

Created:
3 years, 8 months ago by Hzj_jie
Modified:
3 years, 8 months ago
Reviewers:
Sergey Ulanov
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, Jamie
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Merge ScreenCapturerWinDirectx::frames_ and contexts_ The key change of this CL is to merge ScreenCapturerWinDirectx::frames_ and contexts_ into a new DxgiFrame class. So consumers of DxgiDuplicateController does not need to maintain two objects. DxgiDuplicateController::Duplicate*() functions are also updated to accept DxgiFrame parameter instead of SharedDesktopFrame + Context. The advantages of this change are, 1. Once the screen resolution changes or an existing monitor has been removed, DxgiFrame can automatically reset the frame without needing to return a capture failure. 2. Remove public APIs of DxgiDuplicatorController. Some public APIs are not needed anymore, i.e. consumers of DxgiDuplicatorController do not need to take care about these internal states anymore. It also helps to remove several lock acquiements. 3. Reduce the complexity of ScreenCapturerWinDirectx. But the disadvantage is, instead of a boolean value, DxgiDuplicateController::Duplicate*() now return an enumeration. Clients need to use the enumeration to decide whether the error can be recovered or not. This change also removes a duplicating logic in ScreenCapturerWinDirectx. i.e. ResolutionChangeDetector, DxgiDuplicateController now takes care of the screen resolution changes. I have verified the scenarios with and without SharedMemoryFactory, also the Desktop capture API example. So far no regression is detected. BUG=704205 Review-Url: https://codereview.webrtc.org/2788863006 Cr-Commit-Position: refs/heads/master@{#17795} Committed: https://chromium.googlesource.com/external/webrtc/+/cf5753df778c10ec1034076d1f315fd27fad183d

Patch Set 1 #

Total comments: 8

Patch Set 2 : Resolve review comments #

Total comments: 8

Patch Set 3 : Resolve review comments #

Total comments: 2

Patch Set 4 : Resolve review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -268 lines) Patch
M webrtc/modules/desktop_capture/BUILD.gn View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h View 1 2 3 2 chunks +2 lines, -10 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_context.h View 1 2 3 1 chunk +61 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_context.cc View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h View 1 2 3 6 chunks +48 lines, -67 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc View 1 2 10 chunks +94 lines, -92 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_frame.h View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_frame.cc View 1 2 3 1 chunk +66 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h View 1 2 chunks +2 lines, -9 lines 0 comments Download
M webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc View 1 3 chunks +33 lines, -80 lines 0 comments Download

Messages

Total messages: 129 (118 generated)
Hzj_jie
3 years, 8 months ago (2017-04-02 23:54:43 UTC) #55
Hzj_jie
Hi, Sergey, I was talking about this change during the dinner last night :)
3 years, 8 months ago (2017-04-13 18:25:03 UTC) #56
Sergey Ulanov
SOrry about the delay reviewing this CL https://codereview.webrtc.org/2788863006/diff/200001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h File webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h (right): https://codereview.webrtc.org/2788863006/diff/200001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h#newcode107 webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h:107: class Context ...
3 years, 8 months ago (2017-04-18 18:10:16 UTC) #57
Hzj_jie
https://codereview.webrtc.org/2788863006/diff/200001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h File webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h (right): https://codereview.webrtc.org/2788863006/diff/200001/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h#newcode107 webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h:107: class Context { On 2017/04/18 18:10:16, Sergey Ulanov wrote: ...
3 years, 8 months ago (2017-04-18 22:17:54 UTC) #72
Sergey Ulanov
https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc File webrtc/modules/desktop_capture/win/dxgi_frame.cc (right): https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc#newcode37 webrtc/modules/desktop_capture/win/dxgi_frame.cc:37: if (source_id != source_id_) { Do we need to ...
3 years, 8 months ago (2017-04-18 23:39:09 UTC) #73
Hzj_jie
https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc File webrtc/modules/desktop_capture/win/dxgi_frame.cc (right): https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc#newcode37 webrtc/modules/desktop_capture/win/dxgi_frame.cc:37: if (source_id != source_id_) { On 2017/04/18 23:39:09, Sergey ...
3 years, 8 months ago (2017-04-19 04:35:54 UTC) #107
Sergey Ulanov
https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc File webrtc/modules/desktop_capture/win/dxgi_frame.cc (right): https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc#newcode37 webrtc/modules/desktop_capture/win/dxgi_frame.cc:37: if (source_id != source_id_) { On 2017/04/19 04:35:54, Hzj_jie ...
3 years, 8 months ago (2017-04-19 23:29:28 UTC) #108
Hzj_jie
https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc File webrtc/modules/desktop_capture/win/dxgi_frame.cc (right): https://codereview.webrtc.org/2788863006/diff/260001/webrtc/modules/desktop_capture/win/dxgi_frame.cc#newcode37 webrtc/modules/desktop_capture/win/dxgi_frame.cc:37: if (source_id != source_id_) { On 2017/04/19 23:29:27, Sergey ...
3 years, 8 months ago (2017-04-20 01:07:28 UTC) #123
Sergey Ulanov
lgtm
3 years, 8 months ago (2017-04-20 18:47:56 UTC) #124
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/2788863006/470001
3 years, 8 months ago (2017-04-20 19:03:30 UTC) #126
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 19:06:12 UTC) #129
Message was sent while issue was closed.
Committed patchset #4 (id:470001) as
https://chromium.googlesource.com/external/webrtc/+/cf5753df778c10ec1034076d1...

Powered by Google App Engine
This is Rietveld 408576698