summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2023-11-22 15:00:23 -0800
committer Ady Abraham <adyabr@google.com> 2023-11-22 23:02:16 +0000
commit77d406d3694cdcf28febc85ecc62e40554d191f3 (patch)
tree0449183ea1b62e95f763d61454bc980a6d890b72
parent81d8aadf7af97fbb6d9cec8ac48fba93b00b88e5 (diff)
SF: add FrameRateCategory to dumpsys
Test: manual Change-Id: I61872e7f1dd441c831212ffae519dbda1187176c
-rw-r--r--services/surfaceflinger/Layer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index f587e9db39..9195b57886 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1718,10 +1718,18 @@ void Layer::miniDump(std::string& result, const frontend::LayerSnapshot& snapsho
StringAppendF(&result, "%6.1f %6.1f %6.1f %6.1f | ", crop.left, crop.top, crop.right,
crop.bottom);
const auto frameRate = snapshot.frameRate;
+ std::string frameRateStr;
+ if (frameRate.vote.rate.isValid()) {
+ StringAppendF(&frameRateStr, "%.2f", frameRate.vote.rate.getValue());
+ }
if (frameRate.vote.rate.isValid() || frameRate.vote.type != FrameRateCompatibility::Default) {
- StringAppendF(&result, "%s %15s %17s", to_string(frameRate.vote.rate).c_str(),
+ StringAppendF(&result, "%6s %15s %17s", frameRateStr.c_str(),
ftl::enum_string(frameRate.vote.type).c_str(),
ftl::enum_string(frameRate.vote.seamlessness).c_str());
+ } else if (frameRate.category != FrameRateCategory::Default) {
+ StringAppendF(&result, "%6s %15s %17s", frameRateStr.c_str(),
+ (std::string("Cat::") + ftl::enum_string(frameRate.category)).c_str(),
+ ftl::enum_string(frameRate.vote.seamlessness).c_str());
} else {
result.append(41, ' ');
}