From 054b8d3000c7958672b57d25b17b65b1e7fb4e10 Mon Sep 17 00:00:00 2001 From: Huihong Luo Date: Wed, 24 Feb 2021 18:48:12 -0800 Subject: Webview overlay support The basic idea is to create a child surface control from the root surface control passed from ViewRootImpl to the render thread. Transactions are sent back to the java layer to get merged. In case of offscreen layers, SurfaceControl must be disabled. This new feature is disabled for Vulkan at the moment, a new CL will be used to enable the support. Bug: 173671170 Test: manual, webview apks Change-Id: I119405d13eca3c59fd3ec78e50dc7739f78411d4 --- libs/hwui/renderthread/RenderProxy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/hwui/renderthread/RenderProxy.cpp') diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 9361abd20852..1b4b4b999f68 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -295,6 +295,12 @@ void RenderProxy::setPictureCapturedCallback( [this, cb = callback]() { mContext->setPictureCapturedCallback(cb); }); } +void RenderProxy::setASurfaceTransactionCallback( + const std::function& callback) { + mRenderThread.queue().post( + [this, cb = callback]() { mContext->setASurfaceTransactionCallback(cb); }); +} + void RenderProxy::setFrameCallback(std::function&& callback) { mDrawFrameTask.setFrameCallback(std::move(callback)); } -- cgit v1.2.3