Add about:flags to enable/disable SurfaceControl.
Add a gpu finch feature flag and about:flags to enable/disable Android SurfaceControl. This gives us ability to enable/disable SurfaceControl via about:flags on production chrome builds. Bug: 1114874 Change-Id: Id63a3e770253659b015585fa6a34094164a2ebd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355556 Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Khushal <khushalsagar@chromium.org> Commit-Queue: vikas soni <vikassoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#798427}
This commit is contained in:
android_webview/lib
chrome/browser
gpu/config
@@ -220,7 +220,8 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||||||
|
|
||||||
features.DisableIfNotSet(::features::kBackgroundFetch);
|
features.DisableIfNotSet(::features::kBackgroundFetch);
|
||||||
|
|
||||||
features.EnableIfNotSet(::features::kDisableSurfaceControlForWebview);
|
// SurfaceControl is not supported on webview.
|
||||||
|
features.DisableIfNotSet(::features::kAndroidSurfaceControl);
|
||||||
|
|
||||||
// TODO(https://crbug.com/963653): SmsReceiver is not yet supported on
|
// TODO(https://crbug.com/963653): SmsReceiver is not yet supported on
|
||||||
// WebView.
|
// WebView.
|
||||||
|
@@ -6298,6 +6298,10 @@ const FeatureEntry kFeatureEntries[] = {
|
|||||||
flag_descriptions::kCpuAffinityRestrictToLittleCoresDescription,
|
flag_descriptions::kCpuAffinityRestrictToLittleCoresDescription,
|
||||||
kOsAndroid,
|
kOsAndroid,
|
||||||
FEATURE_VALUE_TYPE(features::kCpuAffinityRestrictToLittleCores)},
|
FEATURE_VALUE_TYPE(features::kCpuAffinityRestrictToLittleCores)},
|
||||||
|
|
||||||
|
{"enable-surface-control", flag_descriptions::kAndroidSurfaceControlName,
|
||||||
|
flag_descriptions::kAndroidSurfaceControlDescription, kOsAndroid,
|
||||||
|
FEATURE_VALUE_TYPE(features::kAndroidSurfaceControl)},
|
||||||
#endif // OS_ANDROID
|
#endif // OS_ANDROID
|
||||||
|
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
|
@@ -2093,6 +2093,11 @@
|
|||||||
"owners": [ "fhorschig" ],
|
"owners": [ "fhorschig" ],
|
||||||
"expiry_milestone": 87
|
"expiry_milestone": 87
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "enable-surface-control",
|
||||||
|
"owners": [ "vikassoni", "khushalsagar" ],
|
||||||
|
"expiry_milestone": 90
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "enable-sxg-prefetch-cache-for-navigations",
|
"name": "enable-sxg-prefetch-cache-for-navigations",
|
||||||
"owners": [ "horo", "//content/browser/web_package/OWNERS" ],
|
"owners": [ "horo", "//content/browser/web_package/OWNERS" ],
|
||||||
|
@@ -2566,6 +2566,11 @@ const char kAndroidMultipleDisplayName[] = "Multiple Display";
|
|||||||
const char kAndroidMultipleDisplayDescription[] =
|
const char kAndroidMultipleDisplayDescription[] =
|
||||||
"When enabled, tabs can be moved to the secondary display.";
|
"When enabled, tabs can be moved to the secondary display.";
|
||||||
|
|
||||||
|
const char kAndroidSurfaceControlName[] = "Android SurfaceControl";
|
||||||
|
const char kAndroidSurfaceControlDescription[] =
|
||||||
|
" Enables SurfaceControl to "
|
||||||
|
" manage the buffer queue for the DisplayCompositor on Android.";
|
||||||
|
|
||||||
const char kAppNotificationStatusMessagingName[] =
|
const char kAppNotificationStatusMessagingName[] =
|
||||||
"App notification status messaging";
|
"App notification status messaging";
|
||||||
const char kAppNotificationStatusMessagingDescription[] =
|
const char kAppNotificationStatusMessagingDescription[] =
|
||||||
|
@@ -1486,6 +1486,9 @@ extern const char kAndroidMultipleDisplayDescription[];
|
|||||||
extern const char kAndroidPartnerCustomizationPhenotypeName[];
|
extern const char kAndroidPartnerCustomizationPhenotypeName[];
|
||||||
extern const char kAndroidPartnerCustomizationPhenotypeDescription[];
|
extern const char kAndroidPartnerCustomizationPhenotypeDescription[];
|
||||||
|
|
||||||
|
extern const char kAndroidSurfaceControlName[];
|
||||||
|
extern const char kAndroidSurfaceControlDescription[];
|
||||||
|
|
||||||
extern const char kAppNotificationStatusMessagingName[];
|
extern const char kAppNotificationStatusMessagingName[];
|
||||||
extern const char kAppNotificationStatusMessagingDescription[];
|
extern const char kAppNotificationStatusMessagingDescription[];
|
||||||
|
|
||||||
|
@@ -13,13 +13,15 @@
|
|||||||
namespace features {
|
namespace features {
|
||||||
|
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
// Used only by webview to disable SurfaceControl.
|
|
||||||
const base::Feature kDisableSurfaceControlForWebview{
|
|
||||||
"DisableSurfaceControlForWebview", base::FEATURE_DISABLED_BY_DEFAULT};
|
|
||||||
|
|
||||||
// Used to limit GL version to 2.0 for skia raster on Android.
|
// Used to limit GL version to 2.0 for skia raster on Android.
|
||||||
const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
|
const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
|
||||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||||
|
|
||||||
|
// Use android SurfaceControl API for managing display compositor's buffer queue
|
||||||
|
// and using overlays on Android. Also used by webview to disable surface
|
||||||
|
// SurfaceControl.
|
||||||
|
const base::Feature kAndroidSurfaceControl{"AndroidSurfaceControl",
|
||||||
|
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Enable GPU Rasterization by default. This can still be overridden by
|
// Enable GPU Rasterization by default. This can still be overridden by
|
||||||
@@ -118,10 +120,8 @@ const base::Feature kEnableSharedImageForWebview{
|
|||||||
|
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
bool IsAndroidSurfaceControlEnabled() {
|
bool IsAndroidSurfaceControlEnabled() {
|
||||||
if (base::FeatureList::IsEnabled(kDisableSurfaceControlForWebview))
|
return base::FeatureList::IsEnabled(kAndroidSurfaceControl) &&
|
||||||
return false;
|
gl::SurfaceControl::IsSupported();
|
||||||
|
|
||||||
return gl::SurfaceControl::IsSupported();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -17,9 +17,8 @@ namespace features {
|
|||||||
// All features in alphabetical order. The features should be documented
|
// All features in alphabetical order. The features should be documented
|
||||||
// alongside the definition of their values in the .cc file.
|
// alongside the definition of their values in the .cc file.
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
GPU_EXPORT extern const base::Feature kDisableSurfaceControlForWebview;
|
|
||||||
|
|
||||||
GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
|
GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
|
||||||
|
GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
|
||||||
#endif // defined(OS_ANDROID)
|
#endif // defined(OS_ANDROID)
|
||||||
|
|
||||||
GPU_EXPORT extern const base::Feature kDefaultEnableGpuRasterization;
|
GPU_EXPORT extern const base::Feature kDefaultEnableGpuRasterization;
|
||||||
|
Reference in New Issue
Block a user