summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-01-23 21:56:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-01-23 21:56:55 +0000
commit515bd282c5651e8d42f007c47ade8ecc39c802e4 (patch)
treeedb149cb83a2586f56b3f7612ab9fe97a6bc06dc /libs/hwui/renderthread/RenderProxy.cpp
parentc78f97002ef7a463b50768030319007a895303dc (diff)
parentba7e965316b24abcdce9741c4e276adfcdaba1fe (diff)
Merge "Don't create RenderThread for dumpsys gfxinfo"
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index ab59af71d344..720c60362a55 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -241,8 +241,10 @@ uint32_t RenderProxy::frameTimePercentile(int percentile) {
}
void RenderProxy::dumpGraphicsMemory(int fd) {
- auto& thread = RenderThread::getInstance();
- thread.queue().runSync([&]() { thread.dumpGraphicsMemory(fd); });
+ if (RenderThread::hasInstance()) {
+ auto& thread = RenderThread::getInstance();
+ thread.queue().runSync([&]() { thread.dumpGraphicsMemory(fd); });
+ }
}
void RenderProxy::setProcessStatsBuffer(int fd) {