Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: media/video/capture/screen/screen_capture_device.cc

Issue 12408035: Take advantage of XDAMAGE to support Screen Capture under ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/screen/screen_capture_device.cc
diff --git a/media/video/capture/screen/screen_capture_device.cc b/media/video/capture/screen/screen_capture_device.cc
index 6182f8d4e0e4f710d85831ed56cbddffa630f964..c831d03cd066eac8878e9562d53d57eccc635dc7 100644
--- a/media/video/capture/screen/screen_capture_device.cc
+++ b/media/video/capture/screen/screen_capture_device.cc
@@ -271,8 +271,15 @@ void ScreenCaptureDevice::Core::DoAllocate(int frame_rate) {
frame_rate_ = frame_rate;
// Create and start frame capturer.
+#if defined(OS_CHROMEOS)
+ // ScreenCapturerX11 polls by default, due to poor driver support for DAMAGE.
+ // ChromeOS' drivers [can be patched to] support DAMAGE properly, so use it.
+ if (!screen_capturer_)
Sergey Ulanov 2013/03/17 05:36:32 nit: Maybe pull this line out of the #ifdef - it's
Wez 2013/03/19 18:25:44 Since it's only duplicating one line, I chose to a
+ screen_capturer_ = ScreenCapturer::CreateWithXDamage(true);
+#else
if (!screen_capturer_)
screen_capturer_ = ScreenCapturer::Create();
+#endif
if (screen_capturer_)
screen_capturer_->Start(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698