diff options
| author | 2017-04-13 07:12:51 +0000 | |
|---|---|---|
| committer | 2017-04-13 07:12:56 +0000 | |
| commit | 7dcda8011de1753b0d9f4bf640733f83db601cec (patch) | |
| tree | 0bb8b9b8a614059aafdc821ef007dfaeced3f042 /libs/gui/SurfaceComposerClient.cpp | |
| parent | a30e1cbfcca82951eae9f6a83f630c6bc3b9cfc8 (diff) | |
| parent | db66e627ad8904491e384c64f82fc77a939b9705 (diff) | |
Merge "SurfaceFlinger: Add parent-less relative layering." into oc-dev
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 56c7586041..8c8384399c 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -149,6 +149,8 @@ public:              uint32_t w, uint32_t h);      status_t setLayer(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id,              int32_t z); +    status_t setRelativeLayer(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, +            const sp<IBinder>& relativeTo, int32_t z);      status_t setFlags(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id,              uint32_t flags, uint32_t mask);      status_t setTransparentRegionHint( @@ -343,6 +345,20 @@ status_t Composer::setLayer(const sp<SurfaceComposerClient>& client,      return NO_ERROR;  } +status_t Composer::setRelativeLayer(const sp<SurfaceComposerClient>& client, +        const sp<IBinder>& id, const sp<IBinder>& relativeTo, +        int32_t z) { +    Mutex::Autolock _l(mLock); +    layer_state_t* s = getLayerStateLocked(client, id); +    if (!s) { +        return BAD_INDEX; +    } +    s->what |= layer_state_t::eRelativeLayerChanged; +    s->relativeLayerHandle = relativeTo; +    s->z = z; +    return NO_ERROR; +} +  status_t Composer::setFlags(const sp<SurfaceComposerClient>& client,          const sp<IBinder>& id, uint32_t flags,          uint32_t mask) { @@ -760,6 +776,11 @@ status_t SurfaceComposerClient::setLayer(const sp<IBinder>& id, int32_t z) {      return getComposer().setLayer(this, id, z);  } +status_t SurfaceComposerClient::setRelativeLayer(const sp<IBinder>& id, +        const sp<IBinder>& relativeTo, int32_t z) { +    return getComposer().setRelativeLayer(this, id, relativeTo, z); +} +  status_t SurfaceComposerClient::hide(const sp<IBinder>& id) {      return getComposer().setFlags(this, id,              layer_state_t::eLayerHidden,  |