diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index dd8de11..3eaa287 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -1416,8 +1416,12 @@
   rtc::CritScope stream_lock(&capturer_crit_);
   if (!signal_cpu_adaptation_)
     return;
+  // Do not adapt resolution for screen content as this will likely result in
+  // blurry and unreadable text.
   for (auto& kv : capturers_) {
-    if (kv.second != nullptr && kv.second->video_adapter() != nullptr) {
+    if (kv.second != nullptr
+        && !kv.second->IsScreencast()
+        && kv.second->video_adapter() != nullptr) {
       kv.second->video_adapter()->OnCpuResolutionRequest(
           load == kOveruse ? CoordinatedVideoAdapter::DOWNGRADE
                            : CoordinatedVideoAdapter::UPGRADE);
diff --git a/talk/media/webrtc/webrtcvideoengine2_unittest.cc b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
index 54e52c2..7bcab55 100644
--- a/talk/media/webrtc/webrtcvideoengine2_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
@@ -973,7 +973,7 @@
     EXPECT_EQ(webrtc_ext, recv_stream->GetConfig().rtp.extensions[0].name);
   }
 
-  void TestCpuAdaptation(bool enable_overuse);
+  void TestCpuAdaptation(bool enable_overuse, bool is_screenshare);
 
   FakeVideoSendStream* SetDenoisingOption(bool enabled) {
     VideoOptions options;
@@ -1644,14 +1644,19 @@
 }
 
 TEST_F(WebRtcVideoChannel2Test, AdaptsOnOveruse) {
-  TestCpuAdaptation(true);
+  TestCpuAdaptation(true, false);
 }
 
 TEST_F(WebRtcVideoChannel2Test, DoesNotAdaptOnOveruseWhenDisabled) {
-  TestCpuAdaptation(false);
+  TestCpuAdaptation(false, false);
 }
 
-void WebRtcVideoChannel2Test::TestCpuAdaptation(bool enable_overuse) {
+TEST_F(WebRtcVideoChannel2Test, DoesNotAdaptOnOveruseWhenScreensharing) {
+  TestCpuAdaptation(true, true);
+}
+
+void WebRtcVideoChannel2Test::TestCpuAdaptation(bool enable_overuse,
+                                                bool is_screenshare) {
   cricket::VideoCodec codec = kVp8Codec720p;
   std::vector<cricket::VideoCodec> codecs;
   codecs.push_back(codec);
@@ -1666,6 +1671,7 @@
   AddSendStream();
 
   cricket::FakeVideoCapturer capturer;
+  capturer.SetScreencast(is_screenshare);
   EXPECT_TRUE(channel_->SetCapturer(last_ssrc_, &capturer));
   EXPECT_EQ(cricket::CS_RUNNING,
             capturer.Start(capturer.GetSupportedFormats()->front()));
@@ -1684,7 +1690,7 @@
 
   EXPECT_EQ(1, send_stream->GetNumberOfSwappedFrames());
 
-  if (enable_overuse) {
+  if (enable_overuse && !is_screenshare) {
     EXPECT_LT(send_stream->GetLastWidth(), codec.width);
     EXPECT_LT(send_stream->GetLastHeight(), codec.height);
   } else {
