diff options
| author | 2016-06-22 17:40:46 +0000 | |
|---|---|---|
| committer | 2016-06-22 17:40:48 +0000 | |
| commit | 4bfbe1f7eff1782ad1f9874954fa2703207317df (patch) | |
| tree | d6e7e2c80c916a556054973623dd2f29e88ecfc6 /libs/gui/ISurfaceComposerClient.cpp | |
| parent | 4d6b7221ff4c58d7facd618695c89df76b9a9235 (diff) | |
| parent | a392073ff99c39b52bee88578c37d6a12235faf5 (diff) | |
Merge changes from topic 'seamless-rotation' into nyc-mr1-dev
* changes:
  Reset mFreezePositionUpdates earlier.
  SurfaceControl: Add getTransformToDisplayInverse
  Change setPositionAppliesWithResize to apply to all geometry.
Diffstat (limited to 'libs/gui/ISurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/ISurfaceComposerClient.cpp | 51 | 
1 files changed, 50 insertions, 1 deletions
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index 2ecb9083ff..dd5b169dba 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -41,7 +41,8 @@ enum {      CREATE_SURFACE = IBinder::FIRST_CALL_TRANSACTION,      DESTROY_SURFACE,      CLEAR_LAYER_FRAME_STATS, -    GET_LAYER_FRAME_STATS +    GET_LAYER_FRAME_STATS, +    GET_TRANSFORM_TO_DISPLAY_INVERSE  };  class BpSurfaceComposerClient : public BpInterface<ISurfaceComposerClient> @@ -94,6 +95,35 @@ public:          reply.read(*outStats);          return reply.readInt32();      } + +    virtual status_t getTransformToDisplayInverse(const sp<IBinder>& handle, +            bool* outTransformToDisplayInverse) const { +        Parcel data, reply; +        status_t result = +                data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor()); +        if (result != NO_ERROR) { +            return result; +        } +        result = data.writeStrongBinder(handle); +        if (result != NO_ERROR) { +            return result; +        } +        result = remote()->transact(GET_TRANSFORM_TO_DISPLAY_INVERSE, data, &reply); +        if (result != NO_ERROR) { +            return result; +        } +        int transformInverse; +        result = reply.readInt32(&transformInverse); +        if (result != NO_ERROR) { +            return result; +        } +        *outTransformToDisplayInverse = transformInverse != 0 ? true : false; +        status_t result2 = reply.readInt32(&result); +        if (result2 != NO_ERROR) { +            return result2; +        } +        return result; +    }  };  // Out-of-line virtual method definition to trigger vtable emission in this @@ -145,6 +175,25 @@ status_t BnSurfaceComposerClient::onTransact(              reply->writeInt32(result);              return NO_ERROR;          } +        case GET_TRANSFORM_TO_DISPLAY_INVERSE: { +            CHECK_INTERFACE(ISurfaceComposerClient, data, reply); +            sp<IBinder> handle; +            status_t result = data.readStrongBinder(&handle); +            if (result != NO_ERROR) { +                return result; +            } +            bool transformInverse = false; +            result = getTransformToDisplayInverse(handle, &transformInverse); +            if (result != NO_ERROR) { +                return result; +            } +            result = reply->writeInt32(transformInverse ? 1 : 0); +            if (result != NO_ERROR) { +                return result; +            } +            result = reply->writeInt32(NO_ERROR); +            return result; +        }          default:              return BBinder::onTransact(code, data, reply, flags);      }  |