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/canvas/CanvasOpBuffer.cpp b/libs/hwui/canvas/CanvasOpBuffer.cpp
index 6089c572..336c5d8 100644
--- a/libs/hwui/canvas/CanvasOpBuffer.cpp
+++ b/libs/hwui/canvas/CanvasOpBuffer.cpp
@@ -46,6 +46,10 @@
     LOG_ALWAYS_FATAL("TODO");
 }
 
+void CanvasOpBuffer::onRemovedFromTree() {
+    LOG_ALWAYS_FATAL("TODO");
+}
+
 void CanvasOpBuffer::applyColorTransform(ColorTransform transform) {
     LOG_ALWAYS_FATAL("TODO");
 }
diff --git a/libs/hwui/canvas/CanvasOpBuffer.h b/libs/hwui/canvas/CanvasOpBuffer.h
index af797ca..529546d 100644
--- a/libs/hwui/canvas/CanvasOpBuffer.h
+++ b/libs/hwui/canvas/CanvasOpBuffer.h
@@ -100,6 +100,7 @@
             TreeObserver& observer, TreeInfo& info, bool functorsNeedLayer,
             std::function<void(RenderNode*, TreeObserver&, TreeInfo&, bool)> childFn);
     void syncContents(const WebViewSyncData& data);
+    void onRemovedFromTree();
     void applyColorTransform(ColorTransform transform);
 
     [[nodiscard]] bool isEmpty() const { return !mHas.content; }