Improves comments for ShouldBeCapturable

Bug: webrtc:1314868
Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40994}
This commit is contained in:
henrika 2023-10-23 09:49:37 +02:00 committed by WebRTC LUCI CQ
parent 7c1ddb760c
commit 992d708e8e
2 changed files with 3 additions and 3 deletions

View File

@ -109,9 +109,6 @@ ABI::Windows::Graphics::SizeInt32 WgcWindowSource::GetSize() {
window_rect.bottom - window_rect.top};
}
// Light-weight version of IsCapturable(). Avoids calling
// WgcCaptureSource::IsCapturable() which allocates/deallocates a new COM object
// for each call. Will return false when a window has been minimized.
bool WgcWindowSource::ShouldBeCapturable() {
return IsWindowValidAndVisible(reinterpret_cast<HWND>(GetSourceId()));
}

View File

@ -33,6 +33,9 @@ class WgcCaptureSource {
virtual ~WgcCaptureSource();
virtual DesktopVector GetTopLeft() = 0;
// Lightweight version of IsCapturable which avoids allocating/deallocating
// COM objects for each call. As such may return a different value than
// IsCapturable.
virtual bool ShouldBeCapturable();
virtual bool IsCapturable();
virtual bool FocusOnSource();