diff options
author | Stan Iliev <stani@google.com> | 2018-01-12 11:50:29 -0500 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2018-01-12 11:50:29 -0500 |
commit | a31973fe3a672bb3c17cd3d541134d8fb19d021b (patch) | |
tree | 5ac3dc2372e3dcb824887776a9ad5587009b6cfe /libs/hwui/renderthread/RenderThread.cpp | |
parent | 3101268dd8d7597e5df61093fce87fa914b2e717 (diff) |
Create an empty stub for Vulkan readback
Create a stub for Vulkan readback. This avoids crashing,
because OpenGL readback does not work for Vulkan.
Test: Ran calc and gmail apps with skiavk pipeline.
Change-Id: I11cddde0a1efae1aa549e7a47d01051ec975f470
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 79dc09ffbf1d..8e0546b529af 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -24,6 +24,7 @@ #include "hwui/Bitmap.h" #include "pipeline/skia/SkiaOpenGLPipeline.h" #include "pipeline/skia/SkiaOpenGLReadback.h" +#include "pipeline/skia/SkiaVulkanReadback.h" #include "pipeline/skia/SkiaVulkanPipeline.h" #include "renderstate/RenderState.h" #include "renderthread/OpenGLPipeline.h" @@ -158,12 +159,11 @@ Readback& RenderThread::readback() { mReadback = new OpenGLReadbackImpl(*this); break; case RenderPipelineType::SkiaGL: - case RenderPipelineType::SkiaVulkan: - // It works to use the OpenGL pipeline for Vulkan but this is not - // ideal as it causes us to create an OpenGL context in addition - // to the Vulkan one. mReadback = new skiapipeline::SkiaOpenGLReadback(*this); break; + case RenderPipelineType::SkiaVulkan: + mReadback = new skiapipeline::SkiaVulkanReadback(*this); + break; default: LOG_ALWAYS_FATAL("canvas context type %d not supported", (int32_t)renderType); break; |