From 1db73f66624e7d151710483dd58e03eed672f064 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 21 Dec 2016 12:58:51 -0800 Subject: SurfaceFlinger: Add support for non-privileged clients. Allow clients without privilege to create child layers through scoped connections. We enable this in preparation for allowing SurfaceView to bypass the WindowManager. We include support for reparenting of all of a layer's children for the WindowManager to use in cases where one surface is replacing another (while keeping its children around). Test: Tested with corresponding SurfaceView modifications. Change-Id: I9920e6730d719113522a68788e63fb59f70d3406 --- include/gui/SurfaceComposerClient.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/gui/SurfaceComposerClient.h') diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h index 789dc7c932..f537020b26 100644 --- a/include/gui/SurfaceComposerClient.h +++ b/include/gui/SurfaceComposerClient.h @@ -52,6 +52,7 @@ class SurfaceComposerClient : public RefBase friend class Composer; public: SurfaceComposerClient(); + SurfaceComposerClient(const sp& parent); virtual ~SurfaceComposerClient(); // Always make sure we could initialize @@ -154,6 +155,8 @@ public: status_t setLayerStack(const sp& id, uint32_t layerStack); status_t deferTransactionUntil(const sp& id, const sp& handle, uint64_t frameNumber); + status_t reparentChildren(const sp& id, + const sp& newParentHandle); status_t setOverrideScalingMode(const sp& id, int32_t overrideScalingMode); status_t setGeometryAppliesWithResize(const sp& id); @@ -201,6 +204,7 @@ private: status_t mStatus; sp mClient; Composer& mComposer; + wp mParent; }; // --------------------------------------------------------------------------- -- cgit v1.2.3-59-g8ed1b