summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-02-20 16:14:45 -0800
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-02-20 16:14:45 -0800
commitb0e0a77c19b79e9aec90d055fa2a9be87948ee8a (patch)
treef4e05e04931c9774fde7c7158b2b215377386055 /libs/gui/SurfaceControl.cpp
parent9fc5d99c4996c0230d01840781db8a0a041f4b4f (diff)
parentee4497116b560289f1ad95bae733f707a25a129a (diff)
Snap for 13097162 from ee4497116b560289f1ad95bae733f707a25a129a to 25Q2-release
Change-Id: Iff8ef6cb85edfbfe64bbff67fd27e5c7241d5444
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index ba2d80d1b3..b735418d4b 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -269,11 +269,10 @@ status_t SurfaceControl::readFromParcel(const Parcel& parcel,
SAFE_PARCEL(parcel.readUint32, &format);
// We aren't the original owner of the surface.
- *outSurfaceControl =
- sp<SurfaceControl>::make(sp<SurfaceComposerClient>::make(
- interface_cast<ISurfaceComposerClient>(client)),
- handle, layerId, layerName, width, height, format,
- transformHint);
+ *outSurfaceControl = new SurfaceControl(new SurfaceComposerClient(
+ interface_cast<ISurfaceComposerClient>(client)),
+ handle.get(), layerId, layerName, width, height, format,
+ transformHint);
return NO_ERROR;
}
@@ -304,7 +303,7 @@ sp<SurfaceControl> SurfaceControl::getParentingLayer() {
if (mBbqChild != nullptr) {
return mBbqChild;
}
- return sp<SurfaceControl>::fromExisting(this);
+ return this;
}
uint64_t SurfaceControl::resolveFrameNumber(const std::optional<uint64_t>& frameNumber) {