perf: don't wait for thumbnails if they were not requested on macOS (#46251)
When using the SCK thumbnail capturer, the first refresh has the list of sources, and the second refresh has the thumbnails. If thumbnails are not needed, only wait for the first refresh. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Beutner <beutner.john@gmail.com>
This commit is contained in:
parent
25e5055065
commit
5cddcdf190
2 changed files with 22 additions and 4 deletions
|
@ -328,8 +328,9 @@ void DesktopCapturer::StartHandling(bool capture_window,
|
|||
window_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
window_capturer_->skip_next_refresh_ =
|
||||
ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kWindow) ? 2
|
||||
: 0;
|
||||
ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kWindow)
|
||||
? thumbnail_size.IsEmpty() ? 1 : 2
|
||||
: 0;
|
||||
#endif
|
||||
|
||||
OnceCallback update_callback = base::BindOnce(
|
||||
|
@ -358,8 +359,9 @@ void DesktopCapturer::StartHandling(bool capture_window,
|
|||
screen_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
screen_capturer_->skip_next_refresh_ =
|
||||
ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kScreen) ? 2
|
||||
: 0;
|
||||
ShouldUseThumbnailCapturerMac(DesktopMediaList::Type::kScreen)
|
||||
? thumbnail_size.IsEmpty() ? 1 : 2
|
||||
: 0;
|
||||
#endif
|
||||
|
||||
OnceCallback update_callback = base::BindOnce(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue