Loading include/gui/ISurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ public: * Requires ACCESS_SURFACE_FLINGER permission */ virtual status_t getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const = 0; virtual status_t getTransformToDisplayInverse(const sp<IBinder>& handle, bool* outTransformToDisplayInverse) const = 0; }; // ---------------------------------------------------------------------------- Loading include/gui/SurfaceComposerClient.h +4 −1 Original line number Diff line number Diff line Loading @@ -140,13 +140,16 @@ public: const sp<IBinder>& handle, uint64_t frameNumber); status_t setOverrideScalingMode(const sp<IBinder>& id, int32_t overrideScalingMode); status_t setPositionAppliesWithResize(const sp<IBinder>& id); status_t setGeometryAppliesWithResize(const sp<IBinder>& id); status_t destroySurface(const sp<IBinder>& id); status_t clearLayerFrameStats(const sp<IBinder>& token) const; status_t getLayerFrameStats(const sp<IBinder>& token, FrameStats* outStats) const; status_t getTransformToDisplayInverse(const sp<IBinder>& token, bool* outTransformToDisplayInverse) const; static status_t clearAnimationFrameStats(); static status_t getAnimationFrameStats(FrameStats* outStats); Loading include/gui/SurfaceControl.h +6 −3 Original line number Diff line number Diff line Loading @@ -73,10 +73,11 @@ public: status_t setCrop(const Rect& crop); status_t setFinalCrop(const Rect& crop); // If the size changes in this transaction, position updates specified // If the size changes in this transaction, all geometry updates specified // in this transaction will not complete until a buffer of the new size // arrives. status_t setPositionAppliesWithResize(); // arrives. As some elements normally apply immediately, this enables // freezing the total geometry of a surface until a resize is completed. status_t setGeometryAppliesWithResize(); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber Loading @@ -96,6 +97,8 @@ public: status_t clearLayerFrameStats() const; status_t getLayerFrameStats(FrameStats* outStats) const; status_t getTransformToDisplayInverse(bool* outTransformToDisplayInverse) const; private: // can't be copied SurfaceControl& operator = (SurfaceControl& rhs); Loading include/private/gui/LayerState.h +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ struct layer_state_t { eDeferTransaction = 0x00000200, eFinalCropChanged = 0x00000400, eOverrideScalingModeChanged = 0x00000800, ePositionAppliesWithResize = 0x00001000, eGeometryAppliesWithResize = 0x00001000, }; layer_state_t() Loading libs/gui/ISurfaceComposerClient.cpp +50 −1 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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 Loading Loading @@ -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); } Loading Loading
include/gui/ISurfaceComposerClient.h +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ public: * Requires ACCESS_SURFACE_FLINGER permission */ virtual status_t getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const = 0; virtual status_t getTransformToDisplayInverse(const sp<IBinder>& handle, bool* outTransformToDisplayInverse) const = 0; }; // ---------------------------------------------------------------------------- Loading
include/gui/SurfaceComposerClient.h +4 −1 Original line number Diff line number Diff line Loading @@ -140,13 +140,16 @@ public: const sp<IBinder>& handle, uint64_t frameNumber); status_t setOverrideScalingMode(const sp<IBinder>& id, int32_t overrideScalingMode); status_t setPositionAppliesWithResize(const sp<IBinder>& id); status_t setGeometryAppliesWithResize(const sp<IBinder>& id); status_t destroySurface(const sp<IBinder>& id); status_t clearLayerFrameStats(const sp<IBinder>& token) const; status_t getLayerFrameStats(const sp<IBinder>& token, FrameStats* outStats) const; status_t getTransformToDisplayInverse(const sp<IBinder>& token, bool* outTransformToDisplayInverse) const; static status_t clearAnimationFrameStats(); static status_t getAnimationFrameStats(FrameStats* outStats); Loading
include/gui/SurfaceControl.h +6 −3 Original line number Diff line number Diff line Loading @@ -73,10 +73,11 @@ public: status_t setCrop(const Rect& crop); status_t setFinalCrop(const Rect& crop); // If the size changes in this transaction, position updates specified // If the size changes in this transaction, all geometry updates specified // in this transaction will not complete until a buffer of the new size // arrives. status_t setPositionAppliesWithResize(); // arrives. As some elements normally apply immediately, this enables // freezing the total geometry of a surface until a resize is completed. status_t setGeometryAppliesWithResize(); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber Loading @@ -96,6 +97,8 @@ public: status_t clearLayerFrameStats() const; status_t getLayerFrameStats(FrameStats* outStats) const; status_t getTransformToDisplayInverse(bool* outTransformToDisplayInverse) const; private: // can't be copied SurfaceControl& operator = (SurfaceControl& rhs); Loading
include/private/gui/LayerState.h +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ struct layer_state_t { eDeferTransaction = 0x00000200, eFinalCropChanged = 0x00000400, eOverrideScalingModeChanged = 0x00000800, ePositionAppliesWithResize = 0x00001000, eGeometryAppliesWithResize = 0x00001000, }; layer_state_t() Loading
libs/gui/ISurfaceComposerClient.cpp +50 −1 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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 Loading Loading @@ -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); } Loading