Commit e1899162 authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

[Picture-in-Picture] Disable if no GPU compositing.

This is a temporary fix that sets document.pictureInPictureEnabled to
false in the case of disabling the GPU.

Bug: 806249, 807840
Change-Id: I84445a0231b46cfbd0bb2f25eaca53f96604ce55
Reviewed-on: https://chromium-review.googlesource.com/1042290
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556438}
parent 6daf1e26
...@@ -966,7 +966,14 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, ...@@ -966,7 +966,14 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
static_cast<blink::WebEffectiveConnectionType>( static_cast<blink::WebEffectiveConnectionType>(
prefs.low_priority_iframes_threshold)); prefs.low_priority_iframes_threshold));
settings->SetPictureInPictureEnabled(prefs.picture_in_picture_enabled); // TODO(crbug.com/806249): Remove this once Picture-in-Picture is compatible
// without GPU compositing.
RenderThreadImpl* render_thread = RenderThreadImpl::current();
if (render_thread && render_thread->IsGpuCompositingDisabled()) {
settings->SetPictureInPictureEnabled(false);
} else {
settings->SetPictureInPictureEnabled(prefs.picture_in_picture_enabled);
}
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
settings->SetDoubleTapToZoomEnabled(true); settings->SetDoubleTapToZoomEnabled(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment