Commit Graph

8 Commits

Author SHA1 Message Date
Huihong Luo
34f42fdecd Fix z-order for webview surface control
Set the root surface control transparent, and set the z order of the newly created child surface control to -1.
A new callback is needed to update root surface control in sync from Java side.

Bug: 186750329
Test: use latest APKs from Webview team, play a video, mini toolbar should be visible
Change-Id: I0b37ee8f83fd2b41ff4f2856dbadd31ff6170baf
2021-06-18 10:14:22 -07:00
John Reck
faa1b0ab2a Have HWUI validate the WebViewFunctors at registration
Also tweak how webview's plat_support creates the functor
sruct to be thread-safe, avoids any potential race conditions
even though WebView itself is stated to be thread-hostile in
general. It's too easy to have this just be defined-safe instead.

Bug: 186814981
Test: build & boot, no crashes in real-webview apps
Change-Id: I06f02a279e248fee375ce133c5ce9a2250665ad9
2021-05-13 17:17:21 -04:00
Huihong Luo
054b8d3000 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
2021-04-17 13:24:48 -07:00
Vasiliy Telezhnikov
6b237640fa Add API to WebView functor to support overlays
This CL adds api that exposes SurfaceControl to allow webview to
submit ASurfaceTransaction synchronously with hwui draw.

Test: just new API stubs, nothing to test.
Change-Id: I3a70ad12d04e5a1655887faf3782426a9131a999
2020-11-25 13:11:10 -05:00
Bo Liu
7b8c1eb302 VkFunctorDrawable implementation
Bug: 115613038
Test: Turning on vulkan with appropriate webview apk does not crash and
sort of works.
Change-Id: If1504da7a35e4bd74a994ab2c2a351e6bc415a18
2019-01-15 15:25:04 -08:00
Bo Liu
1b0278c19e Mark GrContext dirty after onContextDestroyed
Bug: 120997728
Test: hwui_unit_test passes
Change-Id: I8b60c45ebf7904b7026b480541dac78b70a59e0d
2019-01-04 07:28:55 -08:00
Bo Liu
d6668e7c0c Plumb new functor in native/webview
Add plumbing to native/webview for the new functor.
Add a void* data parameter to avoid having to use a thread safe
map for in both the plumbing and in webview.

Test: Compiles and webview runs
Bug: 120997728
Change-Id: I0f9f3acb05688a5afcf95974bc0b3b117f33a8e3
2019-01-03 19:15:18 +00:00
John Reck
283bb46846 New WebViewFunctor API
Should function alongside existing functor API.

Bug: 120997728
Test: hwuiunit passes
Change-Id: I8f6143d0be1111431b55016f34de319f6b8c8910
2018-12-14 14:07:18 -08:00