diff options
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r-- | hwc3/impl/HalImpl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp index 240edff..1a56cfa 100644 --- a/hwc3/impl/HalImpl.cpp +++ b/hwc3/impl/HalImpl.cpp @@ -163,11 +163,13 @@ void HalImpl::getCapabilities(std::vector<Capability>* caps) { } void HalImpl::dumpDebugInfo(std::string* output) { - uint32_t count = 0; - mDevice->dump(&count, nullptr); + if (output == nullptr) return; + + String8 result; + mDevice->dump(result); - output->resize(count); - mDevice->dump(&count, output->data()); + output->resize(result.size()); + output->assign(result.c_str()); } void HalImpl::registerEventCallback(EventCallback* callback) { |