summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Client.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2022-10-12 19:03:23 +0000
committer Vishnu Nair <vishnun@google.com> 2022-10-20 18:47:10 +0000
commitcb8be5077baca59c45b3a0975ace5944b251937a (patch)
treebf61f3c267fa30fde06764daed87ea59284634b6 /services/surfaceflinger/Client.cpp
parenta61e4fbf1b2276ae43d23d8889f214f40ca13e20 (diff)
SF: Carve out LayerCreationArgs
Move most layer creation logic outside of Layer. Specify layer sequence id via creation args and move ownerUid/ownerPid into the layer creation args so we can share logic between the existing layer class and the new server layer state. Add layer parent and mirror from handles to be used with the new LayerLifecycleManager. Bug: 238781169 Test: presubmit Change-Id: I7cf344181b29f405c070cda2ad45f06233fd1e8c
Diffstat (limited to 'services/surfaceflinger/Client.cpp')
-rw-r--r--services/surfaceflinger/Client.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 30b875967c..7202bef606 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -24,6 +24,7 @@
#include <gui/AidlStatusUtil.h>
#include "Client.h"
+#include "FrontEnd/LayerCreationArgs.h"
#include "Layer.h"
#include "SurfaceFlinger.h"
@@ -83,7 +84,8 @@ binder::Status Client::createSurface(const std::string& name, int32_t flags,
sp<IBinder> handle;
LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this), name.c_str(),
static_cast<uint32_t>(flags), std::move(metadata));
- const status_t status = mFlinger->createLayer(args, parent, *outResult);
+ args.parentHandle = parent;
+ const status_t status = mFlinger->createLayer(args, *outResult);
return binderStatusFromStatusT(status);
}