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
diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
index 2cd02a0..f8a1f34 100644
--- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
+++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
@@ -2515,8 +2515,8 @@
const String8& name,
const sp<Client>& client,
uint32_t w, uint32_t h, PixelFormat format, uint32_t flags,
- sp<IBinder>* handle, sp<IGraphicBufferProducer>* gbp,
- sp<Layer>* parent)
+ uint32_t windowType, uint32_t ownerUid, sp<IBinder>* handle,
+ sp<IGraphicBufferProducer>* gbp, sp<Layer>* parent)
{
if (int32_t(w|h) < 0) {
ALOGE("createLayer() failed, w or h is negative (w=%d, h=%d)",
@@ -2548,6 +2548,8 @@
return result;
}
+ layer->setInfo(windowType, ownerUid);
+
result = addClientLayer(client, *handle, *gbp, layer, *parent);
if (result != NO_ERROR) {
return result;