diff options
author | 2024-06-18 14:13:37 -0700 | |
---|---|---|
committer | 2024-06-18 14:13:37 -0700 | |
commit | bb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (patch) | |
tree | 27e66123b9acee1a608b520afebbce3b6cd3c037 /libs/gui/DisplayInfo.cpp | |
parent | 13fde70bd413e24c6667ec8ad84ea0d9e07058d6 (diff) | |
parent | 29f1274c966a27f929cf8d6f21a538d53a3f9ac3 (diff) |
Merge 24Q3 (ab/11976889) to aosp-main-future
Bug: 347831320
Merged-In: I30f4c21dfee68603d0dad01d205f8a5581e6db31
Change-Id: I301c522ae67cc1f30fe0ddc819aa3dffd4c32d1a
Diffstat (limited to 'libs/gui/DisplayInfo.cpp')
-rw-r--r-- | libs/gui/DisplayInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/gui/DisplayInfo.cpp b/libs/gui/DisplayInfo.cpp index bd640df81e..47cec0778e 100644 --- a/libs/gui/DisplayInfo.cpp +++ b/libs/gui/DisplayInfo.cpp @@ -37,8 +37,9 @@ status_t DisplayInfo::readFromParcel(const android::Parcel* parcel) { return BAD_VALUE; } + int32_t displayIdInt; float dsdx, dtdx, tx, dtdy, dsdy, ty; - SAFE_PARCEL(parcel->readInt32, &displayId); + SAFE_PARCEL(parcel->readInt32, &displayIdInt); SAFE_PARCEL(parcel->readInt32, &logicalWidth); SAFE_PARCEL(parcel->readInt32, &logicalHeight); SAFE_PARCEL(parcel->readFloat, &dsdx); @@ -48,6 +49,7 @@ status_t DisplayInfo::readFromParcel(const android::Parcel* parcel) { SAFE_PARCEL(parcel->readFloat, &dsdy); SAFE_PARCEL(parcel->readFloat, &ty); + displayId = ui::LogicalDisplayId{displayIdInt}; transform.set({dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1}); return OK; @@ -59,7 +61,7 @@ status_t DisplayInfo::writeToParcel(android::Parcel* parcel) const { return BAD_VALUE; } - SAFE_PARCEL(parcel->writeInt32, displayId); + SAFE_PARCEL(parcel->writeInt32, displayId.val()); SAFE_PARCEL(parcel->writeInt32, logicalWidth); SAFE_PARCEL(parcel->writeInt32, logicalHeight); SAFE_PARCEL(parcel->writeFloat, transform.dsdx()); @@ -76,7 +78,7 @@ void DisplayInfo::dump(std::string& out, const char* prefix) const { using android::base::StringAppendF; out += prefix; - StringAppendF(&out, "DisplayViewport[id=%" PRId32 "]\n", displayId); + StringAppendF(&out, "DisplayViewport[id=%s]\n", displayId.toString().c_str()); out += prefix; StringAppendF(&out, INDENT "Width=%" PRId32 ", Height=%" PRId32 "\n", logicalWidth, logicalHeight); |