summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
authorAndroid Build Role Account android-build-prod <android-build-team-robot@google.com>2019-02-12 05:58:59 +0000
committerAndroid Build Role Account android-build-prod <android-build-team-robot@google.com>2019-02-12 05:58:59 +0000
commita7dd2b1de44a33454f6dec7b6a357ad44428a9ca (patch)
tree9a5d9d4680449b9842b706fdae87b791d09c2335 /libs/hwui/renderthread/RenderThread.cpp
parent96b22aa31947bec4752379a95dbc74955d949240 (diff)
parent38c18202f76e8121451972b6030686f2a782c4ab (diff)
Snap for 5301578 from 38c18202f76e8121451972b6030686f2a782c4ab to q-keystone-qcom-release
Change-Id: I959348fc0cd0ec31d2323fae274455c6cd10fe71
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 8bef35915c4d..3b37c83a6acc 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -203,11 +203,17 @@ void RenderThread::requireGlContext() {
void RenderThread::destroyRenderingContext() {
mFunctorManager.onContextDestroyed();
- if (mEglManager->hasEglContext()) {
- setGrContext(nullptr);
- mEglManager->destroy();
+ if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
+ if (mEglManager->hasEglContext()) {
+ setGrContext(nullptr);
+ mEglManager->destroy();
+ }
+ } else {
+ if (vulkanManager().hasVkContext()) {
+ setGrContext(nullptr);
+ vulkanManager().destroy();
+ }
}
- vulkanManager().destroy();
}
void RenderThread::dumpGraphicsMemory(int fd) {