Take advantage of XDAMAGE to support Screen Capture under ChromeOS.
Screen Capture polls under Linux/X11, to avoid issues with poor XDAMAGE support in some X hardware drivers for things like 3D rendering. This CL enables XDAMAGE support under ChromeOS, since on that platform we can make sure that the drivers support it properly. BUG=177977 Review URL: https://chromiumcodereview.appspot.com/12408035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190032 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -271,8 +271,15 @@ void ScreenCaptureDevice::Core::DoAllocate(int frame_rate) {
|
|||||||
frame_rate_ = frame_rate;
|
frame_rate_ = frame_rate;
|
||||||
|
|
||||||
// Create and start frame capturer.
|
// 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_)
|
||||||
|
screen_capturer_ = ScreenCapturer::CreateWithXDamage(true);
|
||||||
|
#else
|
||||||
if (!screen_capturer_)
|
if (!screen_capturer_)
|
||||||
screen_capturer_ = ScreenCapturer::Create();
|
screen_capturer_ = ScreenCapturer::Create();
|
||||||
|
#endif
|
||||||
if (screen_capturer_)
|
if (screen_capturer_)
|
||||||
screen_capturer_->Start(this);
|
screen_capturer_->Start(this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user