diff options
author | 2025-02-19 10:00:04 -0800 | |
---|---|---|
committer | 2025-02-19 10:00:04 -0800 | |
commit | 328dea0588d956e3bb20635fc80d8d04f63169fa (patch) | |
tree | b06a695ae036b7f61764ab0e6b7823797d249b61 /libs/gui/LayerState.cpp | |
parent | 7ad24b9b794b282aa25d28c42832fd50815f0816 (diff) | |
parent | 81793808b9347a52dd979e4b3d5d9d10fc8c4915 (diff) |
Merge "Harden construction sites of android::StrongPointer." into main
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index ebfc62f33f..43855dadcd 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -684,7 +684,7 @@ void layer_state_t::merge(const layer_state_t& other) { } if (other.what & eInputInfoChanged) { what |= eInputInfoChanged; - windowInfoHandle = new WindowInfoHandle(*other.windowInfoHandle); + windowInfoHandle = sp<WindowInfoHandle>::make(*other.windowInfoHandle); } if (other.what & eBackgroundColorChanged) { what |= eBackgroundColorChanged; @@ -1001,13 +1001,13 @@ status_t BufferData::readFromParcel(const Parcel* input) { bool tmpBool = false; SAFE_PARCEL(input->readBool, &tmpBool); if (tmpBool) { - buffer = new GraphicBuffer(); + buffer = sp<GraphicBuffer>::make(); SAFE_PARCEL(input->read, *buffer); } SAFE_PARCEL(input->readBool, &tmpBool); if (tmpBool) { - acquireFence = new Fence(); + acquireFence = sp<Fence>::make(); SAFE_PARCEL(input->read, *acquireFence); } |