diff options
author | 2023-10-05 15:40:38 -0700 | |
---|---|---|
committer | 2023-10-05 15:40:38 -0700 | |
commit | 1961b2f7b191744f3fc6bb4d32f0da0ce3ee0567 (patch) | |
tree | b9785db180fb54b3a776f645cbb2a7ef480e0cb9 /libs/gui/DisplayInfo.cpp | |
parent | e4b64ebecf894e3047e46894a83ab8d37feabd3e (diff) | |
parent | 313d1596d818bc94fbab3d42b8c50306871f74a5 (diff) |
Merge Android 14
Bug: 298295554
Merged-In: I114a4cf83978f152959a6ec244d322603ff5257b
Change-Id: Ia35ae6e11052fcc3b2bdaabd6dc57d0d223de269
Diffstat (limited to 'libs/gui/DisplayInfo.cpp')
-rw-r--r-- | libs/gui/DisplayInfo.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/gui/DisplayInfo.cpp b/libs/gui/DisplayInfo.cpp index 52d9540eeb..bd640df81e 100644 --- a/libs/gui/DisplayInfo.cpp +++ b/libs/gui/DisplayInfo.cpp @@ -20,8 +20,13 @@ #include <gui/DisplayInfo.h> #include <private/gui/ParcelUtils.h> +#include <android-base/stringprintf.h> #include <log/log.h> +#include <inttypes.h> + +#define INDENT " " + namespace android::gui { // --- DisplayInfo --- @@ -67,4 +72,17 @@ status_t DisplayInfo::writeToParcel(android::Parcel* parcel) const { return OK; } +void DisplayInfo::dump(std::string& out, const char* prefix) const { + using android::base::StringAppendF; + + out += prefix; + StringAppendF(&out, "DisplayViewport[id=%" PRId32 "]\n", displayId); + out += prefix; + StringAppendF(&out, INDENT "Width=%" PRId32 ", Height=%" PRId32 "\n", logicalWidth, + logicalHeight); + std::string transformPrefix(prefix); + transformPrefix.append(INDENT); + transform.dump(out, "Transform", transformPrefix.c_str()); +} + } // namespace android::gui |