diff options
| author | 2016-06-07 20:42:03 +0000 | |
|---|---|---|
| committer | 2016-06-07 20:42:03 +0000 | |
| commit | c3da482bb8081ee2c19b5965585267b8e21cfc7e (patch) | |
| tree | 8db5574b9637eccfbd759bb537591565e30eced2 /libs/gui/SurfaceComposerClient.cpp | |
| parent | 0950fb3d20d100f62961db1cc3eff51b51f9ca6b (diff) | |
| parent | 82364e3cea0bf88fa8147766433329b3dd5148b8 (diff) | |
Merge "SurfaceFlinger: Add mode to apply position with resize." into nyc-dev
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index e33cc37b24..92ae41eec8 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -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); @@ -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) { @@ -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, |