diff options
author | 2025-02-19 19:11:17 -0800 | |
---|---|---|
committer | 2025-02-19 19:11:17 -0800 | |
commit | bb0c493501a5e71438faf15cef1b7e9af64e8a59 (patch) | |
tree | ebd647afba8b281b1f2a9ff53637d5fdd5c09efe /libs/gui/SurfaceControl.cpp | |
parent | 50098249722276f23cdf810459a158ad7b31a52c (diff) | |
parent | f73db7a6242e297ead71df0d0d1fb3a8515245d3 (diff) |
Merge "Revert "Harden construction sites of android::StrongPointer."" into main
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r-- | libs/gui/SurfaceControl.cpp | 11 |
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) { |