From 479c60c85c40fd3536b0c88036e838dc1a4c56a0 Mon Sep 17 00:00:00 2001 From: Albert Chaulk Date: Fri, 27 Jan 2017 14:21:34 -0500 Subject: Refactor how layer metadata for use by VR is propagated from WindowManager based on feedback in frameworks/base. Since windowType and ownerUid are immutable, they are sent on creation instead of separate IPC. Bug: 30984984 Test: built locally Change-Id: I380b3cdcf6aec471fc23f1e27846ab80492e8add --- libs/gui/ISurfaceComposerClient.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libs/gui/ISurfaceComposerClient.cpp') diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index b2036dcadb..5a3fa04379 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -56,8 +56,8 @@ public: virtual status_t createSurface(const String8& name, uint32_t width, uint32_t height, PixelFormat format, uint32_t flags, - const sp& parent, sp* handle, - sp* gbp) { + const sp& parent, uint32_t windowType, uint32_t ownerUid, + sp* handle, sp* gbp) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor()); data.writeString8(name); @@ -65,6 +65,8 @@ public: data.writeUint32(height); data.writeInt32(static_cast(format)); data.writeUint32(flags); + data.writeUint32(windowType); + data.writeUint32(ownerUid); if (parent != nullptr) { data.writeStrongBinder(parent); } @@ -148,6 +150,8 @@ status_t BnSurfaceComposerClient::onTransact( uint32_t height = data.readUint32(); PixelFormat format = static_cast(data.readInt32()); uint32_t createFlags = data.readUint32(); + uint32_t windowType = data.readUint32(); + uint32_t ownerUid = data.readUint32(); sp parent = nullptr; if (data.dataAvail() > 0) { parent = data.readStrongBinder(); @@ -155,7 +159,7 @@ status_t BnSurfaceComposerClient::onTransact( sp handle; sp gbp; status_t result = createSurface(name, width, height, format, - createFlags, parent, &handle, &gbp); + createFlags, parent, windowType, ownerUid, &handle, &gbp); reply->writeStrongBinder(handle); reply->writeStrongBinder(IInterface::asBinder(gbp)); reply->writeInt32(result); -- cgit v1.2.3-59-g8ed1b