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
..
2024-09-02 12:16:47 +00:00
2025-01-08 03:46:30 -08:00
2025-01-29 11:40:53 -08:00
2019-04-09 17:18:20 +00:00
2022-07-13 18:03:07 +00:00
2022-03-16 22:06:04 +00:00
2025-01-27 14:57:28 -08:00
2021-10-01 18:23:59 +00:00
2022-01-24 11:50:20 +00:00
2021-08-09 13:12:52 +00:00
2023-02-15 12:40:12 +00:00
2021-10-01 18:23:59 +00:00
2021-08-09 13:12:52 +00:00
2022-09-02 00:24:58 +00:00
2024-06-18 21:12:12 +00:00
2024-10-31 07:44:25 +00:00
2023-05-10 09:06:19 +00:00
2023-01-28 03:37:46 +00:00
2022-11-14 20:11:43 +00:00
2023-04-13 20:27:24 +00:00
2021-04-13 23:30:52 +00:00
2022-06-15 09:47:38 +00:00
2024-06-20 22:31:41 +00:00
2023-07-12 18:59:24 +00:00
2021-08-09 13:12:52 +00:00
2022-03-31 15:30:07 +00:00
2022-03-31 15:30:07 +00:00
2018-11-28 18:25:07 +00:00
2024-10-31 07:44:25 +00:00
2024-10-31 07:44:25 +00:00
2021-08-09 13:12:52 +00:00
2021-08-09 13:12:52 +00:00
2018-11-28 18:25:07 +00:00
2021-11-15 21:44:59 +00:00
2021-08-09 13:12:52 +00:00
2025-01-08 03:46:30 -08:00
2021-09-22 23:49:50 +00:00
2022-01-27 12:55:44 +00:00
2023-04-03 08:30:59 +00:00
2023-03-10 21:48:11 +00:00
2019-08-21 07:55:07 +00:00
2021-08-09 13:12:52 +00:00
2019-07-08 13:45:15 +00:00
2021-08-10 10:40:03 +00:00
2021-08-09 13:12:52 +00:00
2018-11-28 18:25:07 +00:00
2022-09-01 17:22:47 +00:00
2021-08-09 13:12:52 +00:00
2018-06-19 14:00:39 +00:00
2021-08-09 13:12:52 +00:00
2021-08-09 13:12:52 +00:00
2019-07-08 13:45:15 +00:00
2021-08-09 13:12:52 +00:00
2018-12-22 00:10:40 +00:00
2023-04-20 02:02:45 +00:00
2022-01-24 11:50:20 +00:00
2023-04-20 02:02:45 +00:00
2022-01-24 11:50:20 +00:00
2022-01-24 11:50:20 +00:00
2022-02-15 23:03:41 +00:00
2025-01-08 03:46:30 -08:00
2019-07-08 13:45:15 +00:00
2021-07-22 14:00:26 +00:00
2024-10-31 07:44:25 +00:00
2021-07-09 07:49:43 +00:00
2022-01-24 11:50:20 +00:00
2021-11-09 23:02:32 +00:00
2021-08-09 13:12:52 +00:00
2018-11-28 18:25:07 +00:00
2019-07-08 13:45:15 +00:00
2021-08-09 13:12:52 +00:00
2022-08-17 18:44:29 +00:00
2025-01-08 03:46:30 -08:00
2025-01-08 03:46:30 -08:00
2024-07-08 19:53:25 +00:00
2019-04-09 17:18:20 +00:00
2023-04-20 02:02:45 +00:00
2022-01-24 11:50:20 +00:00
2023-04-13 20:27:24 +00:00
2022-10-25 20:12:30 +00:00
2019-04-09 17:18:20 +00:00
2023-04-13 20:27:24 +00:00
2023-04-13 20:27:24 +00:00
2021-12-14 03:20:34 +00:00
2022-08-18 09:14:30 +00:00
2022-08-18 09:14:30 +00:00
2019-09-17 15:47:29 +00:00
2021-08-09 13:12:52 +00:00
2021-08-09 13:12:52 +00:00
2021-08-09 13:12:52 +00:00
2022-01-18 08:22:15 +00:00
2022-01-24 11:50:20 +00:00
2018-06-19 14:00:39 +00:00
2022-01-24 11:50:20 +00:00
2019-12-16 09:57:59 +00:00
2018-11-28 18:25:07 +00:00
2021-08-09 13:12:52 +00:00
2022-10-25 20:12:30 +00:00
2025-01-08 03:46:30 -08:00
2022-01-27 12:55:44 +00:00
2024-10-31 07:44:25 +00:00
2022-04-15 23:41:16 +00:00
2019-01-25 20:29:58 +00:00
2019-12-03 19:17:24 +00:00
2024-10-18 06:10:21 +00:00
2019-09-17 15:47:29 +00:00
2021-08-09 13:12:52 +00:00