Index: webrtc/media/base/videocapturer.cc |
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc |
index 2d6a15e544046e3ee768ae7b39e4c8a18251cca0..511be8eda948ce23fee8f962764f13e59137f202 100644 |
--- a/webrtc/media/base/videocapturer.cc |
+++ b/webrtc/media/base/videocapturer.cc |
@@ -334,6 +334,15 @@ void VideoCapturer::OnSinkWantsChanged(const rtc::VideoSinkWants& wants) { |
if (frame_factory_) { |
frame_factory_->SetApplyRotation(apply_rotation_); |
} |
+ |
+ // Do not adapt resolution for screen content as this will likely result in |
+ // blurry and unreadable text. |
+ if (wants.resolution != rtc::VideoSinkWants::Resolution::KEEP && |
+ !IsScreencast() && video_adapter()) { |
+ video_adapter()->OnCpuResolutionRequest( |
+ wants.resolution == rtc::VideoSinkWants::Resolution::DOWN ? |
+ CoordinatedVideoAdapter::DOWNGRADE : CoordinatedVideoAdapter::UPGRADE); |
+ } |
} |
void VideoCapturer::OnFrameCaptured(VideoCapturer*, |