webrtc_m130/modules/desktop_capture
fizzfang feabcdb76b Reduce redundant memory allocation when capturing a single monitor.
When capturing only one display, it is unnecessary to use
DoDuplicateAll, which allocates bitmap image memory for a rectangle
encompassing all screens and captures all displays. In this case, I
switch to DoDuplicateOne.

I have added an int parameter to GetNumFrameCaptured and
EnsureFrameCaptured to distinguish which display's skip behavior is
currently being executed.

After the modification, when capturing a single monitor in a
multi-monitor environment, only the bitmap image memory of the size of
the captured monitor will be allocated, rather than for all monitors.

Bug: webrtc:391914255
Change-Id: Iee56796c50282beaf1dbeef47f5937fe7fe94a05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375181
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#43822}
2025-01-29 11:40:53 -08:00
..
2025-01-08 03:46:30 -08:00
2023-04-20 02:02:45 +00:00
2021-11-09 23:02:32 +00:00
2019-07-08 13:45:15 +00:00
2023-04-20 02:02:45 +00:00
2025-01-08 03:46:30 -08:00