Disable Webview Overlay when invisible
Remove Webview overlays when Webview node is set to invisible
Bug: 187292989
Test: play a video in a Webview, toggle visibility for the view, check
existence of a surface control named as "Webview Overlay
SurfaceControl#0"
Change-Id: If47a78a8ae1f7b65b9e7ab983ec72f580d78191a
diff --git a/libs/hwui/WebViewFunctorManager.h b/libs/hwui/WebViewFunctorManager.h
index 048d1fb..f28f310 100644
--- a/libs/hwui/WebViewFunctorManager.h
+++ b/libs/hwui/WebViewFunctorManager.h
@@ -58,6 +58,8 @@
void removeOverlays() { mReference.removeOverlays(); }
+ void onRemovedFromTree() { mReference.onRemovedFromTree(); }
+
private:
friend class WebViewFunctor;
@@ -74,6 +76,7 @@
void postDrawVk();
void destroyContext();
void removeOverlays();
+ void onRemovedFromTree();
ASurfaceControl* getSurfaceControl();
void mergeTransaction(ASurfaceTransaction* transaction);