summaryrefslogtreecommitdiff
path: root/include/gui/ISurfaceComposer.h
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2016-12-21 12:58:51 -0800
committer Robert Carr <racarr@google.com> 2017-01-27 13:59:42 -0800
commit1db73f66624e7d151710483dd58e03eed672f064 (patch)
tree40d09da72f244ae593284ac3bd895d078e9c4220 /include/gui/ISurfaceComposer.h
parentbf89eb7b24f930e77be57bc7b6393e39691a4d35 (diff)
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
Diffstat (limited to 'include/gui/ISurfaceComposer.h')
-rw-r--r--include/gui/ISurfaceComposer.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index ff04e2f276..8af4d46555 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -78,6 +78,17 @@ public:
*/
virtual sp<ISurfaceComposerClient> createConnection() = 0;
+ /** create a scoped connection with surface flinger.
+ * Surfaces produced with this connection will act
+ * as children of the passed in GBP. That is to say
+ * SurfaceFlinger will draw them relative and confined to
+ * drawing of buffers from the layer associated with parent.
+ * As this is graphically equivalent in reach to just drawing
+ * pixels into the parent buffers, it requires no special permission.
+ */
+ virtual sp<ISurfaceComposerClient> createScopedConnection(
+ const sp<IGraphicBufferProducer>& parent) = 0;
+
/* create a graphic buffer allocator
*/
virtual sp<IGraphicBufferAlloc> createGraphicBufferAlloc() = 0;
@@ -216,7 +227,8 @@ public:
GET_ACTIVE_COLOR_MODE,
SET_ACTIVE_COLOR_MODE,
ENABLE_VSYNC_INJECTIONS,
- INJECT_VSYNC
+ INJECT_VSYNC,
+ CREATE_SCOPED_CONNECTION
};
virtual status_t onTransact(uint32_t code, const Parcel& data,