Loading include/gui/SurfaceComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ 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 destroySurface(const sp<IBinder>& id); status_t clearLayerFrameStats(const sp<IBinder>& token) const; Loading include/gui/SurfaceControl.h +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +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 // in this transaction will not complete until a buffer of the new size // arrives. status_t setPositionAppliesWithResize(); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber status_t deferTransactionUntil(sp<IBinder> handle, uint64_t frameNumber); Loading include/private/gui/LayerState.h +2 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ struct layer_state_t { eCropChanged = 0x00000100, eDeferTransaction = 0x00000200, eFinalCropChanged = 0x00000400, eOverrideScalingModeChanged = 0x00000800 eOverrideScalingModeChanged = 0x00000800, ePositionAppliesWithResize = 0x00001000, }; layer_state_t() Loading libs/gui/SurfaceComposerClient.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ public: uint64_t frameNumber); status_t setOverrideScalingMode(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, int32_t overrideScalingMode); status_t setPositionAppliesWithResize(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id); void setDisplaySurface(const sp<IBinder>& token, const sp<IGraphicBufferProducer>& bufferProducer); Loading Loading @@ -443,6 +445,18 @@ status_t Composer::setOverrideScalingMode( return NO_ERROR; } status_t Composer::setPositionAppliesWithResize( const sp<SurfaceComposerClient>& client, const sp<IBinder>& id) { Mutex::Autolock lock(mLock); layer_state_t* s = getLayerStateLocked(client, id); if (!s) { return BAD_INDEX; } s->what |= layer_state_t::ePositionAppliesWithResize; return NO_ERROR; } // --------------------------------------------------------------------------- DisplayState& Composer::getDisplayStateLocked(const sp<IBinder>& token) { Loading Loading @@ -685,6 +699,11 @@ status_t SurfaceComposerClient::setOverrideScalingMode( this, id, overrideScalingMode); } status_t SurfaceComposerClient::setPositionAppliesWithResize( const sp<IBinder>& id) { return getComposer().setPositionAppliesWithResize(this, id); } // ---------------------------------------------------------------------------- void SurfaceComposerClient::setDisplaySurface(const sp<IBinder>& token, Loading libs/gui/SurfaceControl.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,11 @@ status_t SurfaceControl::setPosition(float x, float y) { if (err < 0) return err; return mClient->setPosition(mHandle, x, y); } status_t SurfaceControl::setPositionAppliesWithResize() { status_t err = validate(); if (err < 0) return err; return mClient->setPositionAppliesWithResize(mHandle); } status_t SurfaceControl::setSize(uint32_t w, uint32_t h) { status_t err = validate(); if (err < 0) return err; Loading Loading
include/gui/SurfaceComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ 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 destroySurface(const sp<IBinder>& id); status_t clearLayerFrameStats(const sp<IBinder>& token) const; Loading
include/gui/SurfaceControl.h +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +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 // in this transaction will not complete until a buffer of the new size // arrives. status_t setPositionAppliesWithResize(); // Defers applying any changes made in this transaction until the Layer // identified by handle reaches the given frameNumber status_t deferTransactionUntil(sp<IBinder> handle, uint64_t frameNumber); Loading
include/private/gui/LayerState.h +2 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ struct layer_state_t { eCropChanged = 0x00000100, eDeferTransaction = 0x00000200, eFinalCropChanged = 0x00000400, eOverrideScalingModeChanged = 0x00000800 eOverrideScalingModeChanged = 0x00000800, ePositionAppliesWithResize = 0x00001000, }; layer_state_t() Loading
libs/gui/SurfaceComposerClient.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ public: uint64_t frameNumber); status_t setOverrideScalingMode(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, int32_t overrideScalingMode); status_t setPositionAppliesWithResize(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id); void setDisplaySurface(const sp<IBinder>& token, const sp<IGraphicBufferProducer>& bufferProducer); Loading Loading @@ -443,6 +445,18 @@ status_t Composer::setOverrideScalingMode( return NO_ERROR; } status_t Composer::setPositionAppliesWithResize( const sp<SurfaceComposerClient>& client, const sp<IBinder>& id) { Mutex::Autolock lock(mLock); layer_state_t* s = getLayerStateLocked(client, id); if (!s) { return BAD_INDEX; } s->what |= layer_state_t::ePositionAppliesWithResize; return NO_ERROR; } // --------------------------------------------------------------------------- DisplayState& Composer::getDisplayStateLocked(const sp<IBinder>& token) { Loading Loading @@ -685,6 +699,11 @@ status_t SurfaceComposerClient::setOverrideScalingMode( this, id, overrideScalingMode); } status_t SurfaceComposerClient::setPositionAppliesWithResize( const sp<IBinder>& id) { return getComposer().setPositionAppliesWithResize(this, id); } // ---------------------------------------------------------------------------- void SurfaceComposerClient::setDisplaySurface(const sp<IBinder>& token, Loading
libs/gui/SurfaceControl.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,11 @@ status_t SurfaceControl::setPosition(float x, float y) { if (err < 0) return err; return mClient->setPosition(mHandle, x, y); } status_t SurfaceControl::setPositionAppliesWithResize() { status_t err = validate(); if (err < 0) return err; return mClient->setPositionAppliesWithResize(mHandle); } status_t SurfaceControl::setSize(uint32_t w, uint32_t h) { status_t err = validate(); if (err < 0) return err; Loading