diff options
Diffstat (limited to 'libs/input/InputWindow.cpp')
-rw-r--r-- | libs/input/InputWindow.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp index 36c1f8068d..d5d35e6a96 100644 --- a/libs/input/InputWindow.cpp +++ b/libs/input/InputWindow.cpp @@ -57,7 +57,7 @@ bool InputWindowInfo::operator==(const InputWindowInfo& info) const { info.frameLeft == frameLeft && info.frameTop == frameTop && info.frameRight == frameRight && info.frameBottom == frameBottom && info.surfaceInset == surfaceInset && info.globalScaleFactor == globalScaleFactor && - info.windowXScale == windowXScale && info.windowYScale == windowYScale && + info.transform == transform && info.touchableRegion.hasSameRects(touchableRegion) && info.visible == visible && info.canReceiveKeys == canReceiveKeys && info.trustedOverlay == trustedOverlay && info.hasFocus == hasFocus && info.hasWallpaper == hasWallpaper && @@ -93,8 +93,12 @@ status_t InputWindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->writeInt32(frameBottom) ?: parcel->writeInt32(surfaceInset) ?: parcel->writeFloat(globalScaleFactor) ?: - parcel->writeFloat(windowXScale) ?: - parcel->writeFloat(windowYScale) ?: + parcel->writeFloat(transform.dsdx()) ?: + parcel->writeFloat(transform.dtdx()) ?: + parcel->writeFloat(transform.tx()) ?: + parcel->writeFloat(transform.dtdy()) ?: + parcel->writeFloat(transform.dsdy()) ?: + parcel->writeFloat(transform.ty()) ?: parcel->writeBool(visible) ?: parcel->writeBool(canReceiveKeys) ?: parcel->writeBool(hasFocus) ?: @@ -132,14 +136,19 @@ status_t InputWindowInfo::readFromParcel(const android::Parcel* parcel) { flags = Flags<Flag>(parcel->readInt32()); type = static_cast<Type>(parcel->readInt32()); + float dsdx, dtdx, tx, dtdy, dsdy, ty; status = parcel->readInt32(&frameLeft) ?: parcel->readInt32(&frameTop) ?: parcel->readInt32(&frameRight) ?: parcel->readInt32(&frameBottom) ?: parcel->readInt32(&surfaceInset) ?: parcel->readFloat(&globalScaleFactor) ?: - parcel->readFloat(&windowXScale) ?: - parcel->readFloat(&windowYScale) ?: + parcel->readFloat(&dsdx) ?: + parcel->readFloat(&dtdx) ?: + parcel->readFloat(&tx) ?: + parcel->readFloat(&dtdy) ?: + parcel->readFloat(&dsdy) ?: + parcel->readFloat(&ty) ?: parcel->readBool(&visible) ?: parcel->readBool(&canReceiveKeys) ?: parcel->readBool(&hasFocus) ?: @@ -165,6 +174,7 @@ status_t InputWindowInfo::readFromParcel(const android::Parcel* parcel) { } touchableRegionCropHandle = parcel->readStrongBinder(); + transform.set(std::array<float, 9>{dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1}); return OK; } |