Commit f7f3b08d authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

Add feature flag for hiding incorrectly-sized fullscreen frames

Bug: 710243
Change-Id: If8fe0c711f1c5e81888fcff9190497a1319e20db
Reviewed-on: https://chromium-review.googlesource.com/577976
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Reviewed-by: default avatarAlexandre Elias <aelias@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488232}
parent ca9a55da
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_iterator.h" #include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/gles2_interface.h" #include "gpu/command_buffer/client/gles2_interface.h"
...@@ -1199,6 +1200,10 @@ void RenderWidgetHostViewAndroid::DidCreateNewRendererCompositorFrameSink( ...@@ -1199,6 +1200,10 @@ void RenderWidgetHostViewAndroid::DidCreateNewRendererCompositorFrameSink(
} }
void RenderWidgetHostViewAndroid::EvictFrameIfNecessary() { void RenderWidgetHostViewAndroid::EvictFrameIfNecessary() {
if (!base::FeatureList::IsEnabled(
features::kHideIncorrectlySizedFullscreenFrames)) {
return;
}
if (host_->delegate()->IsFullscreenForCurrentTab() && if (host_->delegate()->IsFullscreenForCurrentTab() &&
current_surface_size_ != view_.GetPhysicalBackingSize()) { current_surface_size_ != view_.GetPhysicalBackingSize()) {
// When we're in a fullscreen and the frame size doesn't match the view // When we're in a fullscreen and the frame size doesn't match the view
......
...@@ -405,6 +405,10 @@ const base::Feature kSendBeaconThrowForBlobWithNonSimpleType{ ...@@ -405,6 +405,10 @@ const base::Feature kSendBeaconThrowForBlobWithNonSimpleType{
const base::Feature kAndroidAutofillAccessibility{ const base::Feature kAndroidAutofillAccessibility{
"AndroidAutofillAccessibility", base::FEATURE_ENABLED_BY_DEFAULT}; "AndroidAutofillAccessibility", base::FEATURE_ENABLED_BY_DEFAULT};
// Enables hiding incorrectly-sized frames while in fullscreen.
const base::Feature kHideIncorrectlySizedFullscreenFrames{
"HideIncorrectlySizedFullscreenFrames", base::FEATURE_ENABLED_BY_DEFAULT};
// Service worker based payment apps as defined by w3c here: // Service worker based payment apps as defined by w3c here:
// https://w3c.github.io/webpayments-payment-apps-api/ // https://w3c.github.io/webpayments-payment-apps-api/
const base::Feature kServiceWorkerPaymentApps{ const base::Feature kServiceWorkerPaymentApps{
......
...@@ -102,6 +102,7 @@ extern const base::Feature kSendBeaconThrowForBlobWithNonSimpleType; ...@@ -102,6 +102,7 @@ extern const base::Feature kSendBeaconThrowForBlobWithNonSimpleType;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
CONTENT_EXPORT extern const base::Feature kAndroidAutofillAccessibility; CONTENT_EXPORT extern const base::Feature kAndroidAutofillAccessibility;
CONTENT_EXPORT extern const base::Feature kHideIncorrectlySizedFullscreenFrames;
CONTENT_EXPORT extern const base::Feature kImeThread; CONTENT_EXPORT extern const base::Feature kImeThread;
CONTENT_EXPORT extern const base::Feature kServiceWorkerPaymentApps; CONTENT_EXPORT extern const base::Feature kServiceWorkerPaymentApps;
CONTENT_EXPORT extern const base::Feature kWebNfc; CONTENT_EXPORT extern const base::Feature kWebNfc;
......
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