summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Anton Ivanov <aii@google.com> 2025-02-19 10:00:04 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-19 10:00:04 -0800
commit328dea0588d956e3bb20635fc80d8d04f63169fa (patch)
treeb06a695ae036b7f61764ab0e6b7823797d249b61 /libs/gui/LayerState.cpp
parent7ad24b9b794b282aa25d28c42832fd50815f0816 (diff)
parent81793808b9347a52dd979e4b3d5d9d10fc8c4915 (diff)
Merge "Harden construction sites of android::StrongPointer." into main
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp6
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);
}