summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Client.cpp
diff options
context:
space:
mode:
author Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> 2025-01-10 03:57:14 -0800
committer Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> 2025-01-10 04:00:25 -0800
commit42a6b622f3b71b27d0153ddab9aac9f829a78604 (patch)
tree93bd828f0e39f0b473b3afa28ac930925ca3548c /services/surfaceflinger/Client.cpp
parent33a6e89aa8ebde305ea3bc408d3b5b96756cacd6 (diff)
Remove redundant local parameters in Client
The Android version upgrade modified the declaration of createLayer and mirrorLayer functions in SurfaceFlinger, removed multiple parameters of objects such as IBinder, and also modified the mirrorDisplay function in Client, causing their local variables sp<IBinder> handle to be redundant. Signed-off-by: Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com> Change-Id: Ifa8db1993fa46209a9d935c9ff588d2d0dc4c5f8
Diffstat (limited to 'services/surfaceflinger/Client.cpp')
-rw-r--r--services/surfaceflinger/Client.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index abeb2a92eb..77bf1457c3 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -53,7 +53,6 @@ binder::Status Client::createSurface(const std::string& name, int32_t flags,
const sp<IBinder>& parent, const gui::LayerMetadata& metadata,
gui::CreateSurfaceResult* outResult) {
// We rely on createLayer to check permissions.
- sp<IBinder> handle;
LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this), name.c_str(),
static_cast<uint32_t>(flags), std::move(metadata));
args.parentHandle = parent;
@@ -101,7 +100,6 @@ binder::Status Client::getLayerFrameStats(const sp<IBinder>& handle, gui::FrameS
binder::Status Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle,
gui::CreateSurfaceResult* outResult) {
- sp<IBinder> handle;
LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this), "MirrorRoot",
0 /* flags */, gui::LayerMetadata());
status_t status = mFlinger->mirrorLayer(args, mirrorFromHandle, *outResult);
@@ -109,7 +107,6 @@ binder::Status Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle,
}
binder::Status Client::mirrorDisplay(int64_t displayId, gui::CreateSurfaceResult* outResult) {
- sp<IBinder> handle;
LayerCreationArgs args(mFlinger.get(), sp<Client>::fromExisting(this),
"MirrorRoot-" + std::to_string(displayId), 0 /* flags */,
gui::LayerMetadata());