From 2c358bf8206d591a4707d33fd2ca45f0dc5360f7 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 8 Aug 2018 15:58:15 -0700 Subject: Add setInputWindowInfo to SurfaceComposerClient::Transaction In preparation for passing input through SurfaceFlinger to the InputDispatcher. Bug: 80101428 Bug: 113136004 Bug: 111440400 Change-Id: I5f67fbb9894136bfb16c718ffe1cc23a02f3414d --- libs/gui/LayerState.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 7b71b39ce0..9f30060467 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -50,6 +50,9 @@ status_t layer_state_t::write(Parcel& output) const output.writeFloat(color.r); output.writeFloat(color.g); output.writeFloat(color.b); +#ifndef NO_INPUT + inputInfo.write(output); +#endif output.write(transparentRegion); output.writeUint32(transform); output.writeBool(transformToDisplayInverse); @@ -120,6 +123,11 @@ status_t layer_state_t::read(const Parcel& input) color.r = input.readFloat(); color.g = input.readFloat(); color.b = input.readFloat(); + +#ifndef NO_INPUT + inputInfo = InputWindowInfo::read(input); +#endif + input.read(transparentRegion); transform = input.readUint32(); transformToDisplayInverse = input.readBool(); @@ -343,6 +351,13 @@ void layer_state_t::merge(const layer_state_t& other) { listenerCallbacks = other.listenerCallbacks; } +#ifndef NO_INPUT + if (other.what & eInputInfoChanged) { + what |= eInputInfoChanged; + inputInfo = other.inputInfo; + } +#endif + if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%X what=0x%X", -- cgit v1.2.3-59-g8ed1b