summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2019-01-23 10:33:41 -0800
committerJohn Reck <jreck@google.com>2019-01-23 10:33:41 -0800
commitba7e965316b24abcdce9741c4e276adfcdaba1fe (patch)
tree4c45988d49d686122873f8c6be0b7b463f7f247b /libs/hwui/renderthread/RenderProxy.cpp
parent6f19cbdd2f285a7d54ce7694488e307bbe26bfc9 (diff)
Don't create RenderThread for dumpsys gfxinfo
Change-Id: I4cbad14ad6f952ddec11eb732701909fd75ff137 Fixes: 121129527 Test: guess
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 aa6af23d8ed3..23a0a2b053ed 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -244,8 +244,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) {