summaryrefslogtreecommitdiff
path: root/native/webview
diff options
context:
space:
mode:
authorBo Liu <boliu@google.com>2019-01-09 11:43:16 -0800
committerBo Liu <boliu@google.com>2019-01-09 20:41:06 +0000
commit30eef074f2058ce568d53d7e3d3ac13504dc86ec (patch)
treee8cfd608caf445cb6c872248d65363bd64c22554 /native/webview
parentbd692981600b26849f8f39f38dcf15b75e855c67 (diff)
Make sure interop path works with draw_fn
plat_support to pass through the GL functor even if hwui is using vulkan pipeline, since interop calls the GL functor. Also remove sGLDrawThread and call functor on render thread, since onDestroy and onContextDestroy are currently hard coded to run on render thread as well, and functor expects all calls to be called on a single thread. Bug: 115613038 Test: draw_fn functor works with vulkan enabled Change-Id: Ie3fa643695e95a6cc383f7ffe3eb3ad741792707
Diffstat (limited to 'native/webview')
-rw-r--r--native/webview/plat_support/draw_functor.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/native/webview/plat_support/draw_functor.cpp b/native/webview/plat_support/draw_functor.cpp
index 820bac509d2e..6c1ceaba4d46 100644
--- a/native/webview/plat_support/draw_functor.cpp
+++ b/native/webview/plat_support/draw_functor.cpp
@@ -82,13 +82,9 @@ int CreateFunctor(void* data, AwDrawFnFunctorCallbacks* functor_callbacks) {
.onDestroyed = &onDestroyed,
};
if (!callbacks_initialized) {
- switch (uirenderer::WebViewFunctor_queryPlatformRenderMode()) {
- case uirenderer::RenderMode::OpenGL_ES:
- webview_functor_callbacks.gles.draw = &draw_gl;
- break;
- case uirenderer::RenderMode::Vulkan:
- break;
- }
+ // Under uirenderer::RenderMode::Vulkan, whether gles or vk union should
+ // be populated should match whether the vk-gl interop is used.
+ webview_functor_callbacks.gles.draw = &draw_gl;
callbacks_initialized = true;
}
SupportData* support = new SupportData{