Loading libs/gui/LayerState.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ status_t layer_state_t::write(Parcel& output) const output.writeInt32(overrideScalingMode); output.writeStrongBinder(IInterface::asBinder(barrierGbp)); output.writeStrongBinder(relativeLayerHandle); output.writeStrongBinder(parentHandleForChild); output.writeStrongBinder(childHandle); output.write(transparentRegion); return NO_ERROR; } Loading Loading @@ -77,6 +79,8 @@ status_t layer_state_t::read(const Parcel& input) barrierGbp = interface_cast<IGraphicBufferProducer>(input.readStrongBinder()); relativeLayerHandle = input.readStrongBinder(); parentHandleForChild = input.readStrongBinder(); childHandle = input.readStrongBinder(); input.read(transparentRegion); return NO_ERROR; } Loading libs/gui/SurfaceComposerClient.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,9 @@ public: status_t reparentChildren(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle); status_t reparentChild(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); status_t detachChildren(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id); status_t setOverrideScalingMode(const sp<SurfaceComposerClient>& client, Loading Loading @@ -493,6 +496,21 @@ status_t Composer::reparentChildren( return NO_ERROR; } status_t Composer::reparentChild(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { Mutex::Autolock lock(mLock); layer_state_t* s = getLayerStateLocked(client, id); if (!s) { return BAD_INDEX; } s->what |= layer_state_t::eReparentChild; s->parentHandleForChild = newParentHandle; s->childHandle = childHandle; return NO_ERROR; } status_t Composer::detachChildren( const sp<SurfaceComposerClient>& client, const sp<IBinder>& id) { Loading Loading @@ -831,6 +849,11 @@ status_t SurfaceComposerClient::reparentChildren(const sp<IBinder>& id, return getComposer().reparentChildren(this, id, newParentHandle); } status_t SurfaceComposerClient::reparentChild(const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { return getComposer().reparentChild(this, id, newParentHandle, childHandle); } status_t SurfaceComposerClient::detachChildren(const sp<IBinder>& id) { return getComposer().detachChildren(this, id); } Loading libs/gui/SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,13 @@ status_t SurfaceControl::reparentChildren(const sp<IBinder>& newParentHandle) { return mClient->reparentChildren(mHandle, newParentHandle); } status_t SurfaceControl::reparentChild(const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { status_t err = validate(); if (err < 0) return err; return mClient->reparentChild(mHandle, newParentHandle, childHandle); } status_t SurfaceControl::detachChildren() { status_t err = validate(); if (err < 0) return err; Loading libs/gui/include/gui/SurfaceComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,8 @@ public: const sp<Surface>& handle, uint64_t frameNumber); status_t reparentChildren(const sp<IBinder>& id, const sp<IBinder>& newParentHandle); status_t reparentChild(const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); status_t detachChildren(const sp<IBinder>& id); status_t setOverrideScalingMode(const sp<IBinder>& id, int32_t overrideScalingMode); Loading libs/gui/include/gui/SurfaceControl.h +6 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,12 @@ public: // Reparents all children of this layer to the new parent handle. status_t reparentChildren(const sp<IBinder>& newParentHandle); // Reparents a specified child from this layer to the new parent handle. // The child, parent, and new parent must all have the same client. // This can be used instead of reparentChildren if the caller wants to // only re-parent specific children. status_t reparentChild(const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); // Detaches all child surfaces (and their children recursively) // from their SurfaceControl. // The child SurfaceControl's will not throw exceptions or return errors, Loading Loading
libs/gui/LayerState.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,8 @@ status_t layer_state_t::write(Parcel& output) const output.writeInt32(overrideScalingMode); output.writeStrongBinder(IInterface::asBinder(barrierGbp)); output.writeStrongBinder(relativeLayerHandle); output.writeStrongBinder(parentHandleForChild); output.writeStrongBinder(childHandle); output.write(transparentRegion); return NO_ERROR; } Loading Loading @@ -77,6 +79,8 @@ status_t layer_state_t::read(const Parcel& input) barrierGbp = interface_cast<IGraphicBufferProducer>(input.readStrongBinder()); relativeLayerHandle = input.readStrongBinder(); parentHandleForChild = input.readStrongBinder(); childHandle = input.readStrongBinder(); input.read(transparentRegion); return NO_ERROR; } Loading
libs/gui/SurfaceComposerClient.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,9 @@ public: status_t reparentChildren(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle); status_t reparentChild(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); status_t detachChildren(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id); status_t setOverrideScalingMode(const sp<SurfaceComposerClient>& client, Loading Loading @@ -493,6 +496,21 @@ status_t Composer::reparentChildren( return NO_ERROR; } status_t Composer::reparentChild(const sp<SurfaceComposerClient>& client, const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { Mutex::Autolock lock(mLock); layer_state_t* s = getLayerStateLocked(client, id); if (!s) { return BAD_INDEX; } s->what |= layer_state_t::eReparentChild; s->parentHandleForChild = newParentHandle; s->childHandle = childHandle; return NO_ERROR; } status_t Composer::detachChildren( const sp<SurfaceComposerClient>& client, const sp<IBinder>& id) { Loading Loading @@ -831,6 +849,11 @@ status_t SurfaceComposerClient::reparentChildren(const sp<IBinder>& id, return getComposer().reparentChildren(this, id, newParentHandle); } status_t SurfaceComposerClient::reparentChild(const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { return getComposer().reparentChild(this, id, newParentHandle, childHandle); } status_t SurfaceComposerClient::detachChildren(const sp<IBinder>& id) { return getComposer().detachChildren(this, id); } Loading
libs/gui/SurfaceControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,13 @@ status_t SurfaceControl::reparentChildren(const sp<IBinder>& newParentHandle) { return mClient->reparentChildren(mHandle, newParentHandle); } status_t SurfaceControl::reparentChild(const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle) { status_t err = validate(); if (err < 0) return err; return mClient->reparentChild(mHandle, newParentHandle, childHandle); } status_t SurfaceControl::detachChildren() { status_t err = validate(); if (err < 0) return err; Loading
libs/gui/include/gui/SurfaceComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,8 @@ public: const sp<Surface>& handle, uint64_t frameNumber); status_t reparentChildren(const sp<IBinder>& id, const sp<IBinder>& newParentHandle); status_t reparentChild(const sp<IBinder>& id, const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); status_t detachChildren(const sp<IBinder>& id); status_t setOverrideScalingMode(const sp<IBinder>& id, int32_t overrideScalingMode); Loading
libs/gui/include/gui/SurfaceControl.h +6 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,12 @@ public: // Reparents all children of this layer to the new parent handle. status_t reparentChildren(const sp<IBinder>& newParentHandle); // Reparents a specified child from this layer to the new parent handle. // The child, parent, and new parent must all have the same client. // This can be used instead of reparentChildren if the caller wants to // only re-parent specific children. status_t reparentChild(const sp<IBinder>& newParentHandle, const sp<IBinder>& childHandle); // Detaches all child surfaces (and their children recursively) // from their SurfaceControl. // The child SurfaceControl's will not throw exceptions or return errors, Loading