summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Priyanka Advani (xWF) <padvani@google.com> 2025-02-19 17:35:16 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-19 17:35:16 -0800
commitf73db7a6242e297ead71df0d0d1fb3a8515245d3 (patch)
treed8b75648a2c39694a22e13dec94ac10344ca11ec /libs/gui/SurfaceControl.cpp
parent81793808b9347a52dd979e4b3d5d9d10fc8c4915 (diff)
Revert "Harden construction sites of android::StrongPointer."
This reverts commit 81793808b9347a52dd979e4b3d5d9d10fc8c4915. Reason for revert: Droidmonitor created revert due to b/397788382. Will be verifying through ABTD before submission. Change-Id: Idd58b82a5a5380053cdff4e7b92eafa66b2c2782
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) {