Add SkiaVk backend to RenderEngine
This CL adds a new backend, SkiaVk, to RenderEngine.
The new functionality is to create a Vulkan device/instance (possibly
protected) and handle flush/waitFence via VkSemaphores fed to
GrBackendSemaphores.
+ make ctors of GLES/Vk RE's private so as to ensure GrContexts are
created
Test: atest librenderengine_test
Bug: 236390072
Change-Id: I69119623b194885bcc4cf2ddc8e592576b713b19
diff --git a/libs/renderengine/skia/SkiaRenderEngine.cpp b/libs/renderengine/skia/SkiaRenderEngine.cpp
index b9aa5ac..c3f6649 100644
--- a/libs/renderengine/skia/SkiaRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaRenderEngine.cpp
@@ -388,9 +388,11 @@
void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer,
bool isRenderable) {
- // Only run this if RE is running on its own thread. This way the access to GL
- // operations is guaranteed to be happening on the same thread.
- if (mRenderEngineType != RenderEngineType::SKIA_GL_THREADED) {
+ // Only run this if RE is running on its own thread. This
+ // way the access to GL operations is guaranteed to be happening on the
+ // same thread.
+ if (mRenderEngineType != RenderEngineType::SKIA_GL_THREADED &&
+ mRenderEngineType != RenderEngineType::SKIA_VK_THREADED) {
return;
}
// We currently don't attempt to map a buffer if the buffer contains protected content