summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Marin Shalamanov <shalamanov@google.com> 2020-09-07 09:31:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-09-07 09:31:43 +0000
commit2d19dd65a8ab076eb99470dcc8162f15c00d4005 (patch)
treea867c692b2b962bf38167be26a7daeb78102175e /services/surfaceflinger/SurfaceFlinger.cpp
parent14f2174cc7d1eeae005f1af8a9f38e756ae43414 (diff)
parent61b00bcdec48f8856cde48616dd95609e4c4bff2 (diff)
Merge changes I0332cc46,I5f8c7737
* changes: Fix dump of active config SF: In dumpsys add head row for "Allocated buffers" table
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9e5b8d8d7e..65017491b7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4824,9 +4824,10 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co
const auto activeConfig = getHwComposer().getActiveConfig(*displayId);
std::string fps, xDpi, yDpi;
if (activeConfig) {
- fps = std::to_string(1e9 / getHwComposer().getDisplayVsyncPeriod(*displayId)) + " fps";
- xDpi = activeConfig->getDpiX();
- yDpi = activeConfig->getDpiY();
+ fps = base::StringPrintf("%.2f Hz",
+ 1e9f / getHwComposer().getDisplayVsyncPeriod(*displayId));
+ xDpi = base::StringPrintf("%.2f", activeConfig->getDpiX());
+ yDpi = base::StringPrintf("%.2f", activeConfig->getDpiY());
} else {
fps = "unknown";
xDpi = "unknown";