Add a sys prop to control WebView Overlays support
The boolean system property is named as "debug.hwui.webview_overlays_enabled"
Bug: 192267127
Test: change the property value, check presence of Webview Surface
Control
Change-Id: I01e3e26282a5fa79aa504a6e49c5abe1a1c3ea02
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index f0995c4..b8fa55a 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -84,6 +84,8 @@
bool Properties::useHintManager = true;
int Properties::targetCpuTimePercentage = 70;
+bool Properties::enableWebViewOverlays = false;
+
StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI;
bool Properties::load() {
@@ -137,6 +139,8 @@
targetCpuTimePercentage = base::GetIntProperty(PROPERTY_TARGET_CPU_TIME_PERCENTAGE, 70);
if (targetCpuTimePercentage <= 0 || targetCpuTimePercentage > 100) targetCpuTimePercentage = 70;
+ enableWebViewOverlays = base::GetBoolProperty(PROPERTY_WEBVIEW_OVERLAYS_ENABLED, false);
+
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
}