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/IGraphicBufferProducerFlattenables.cpp | |
parent | 7ad24b9b794b282aa25d28c42832fd50815f0816 (diff) | |
parent | 81793808b9347a52dd979e4b3d5d9d10fc8c4915 (diff) |
Merge "Harden construction sites of android::StrongPointer." into main
Diffstat (limited to 'libs/gui/IGraphicBufferProducerFlattenables.cpp')
-rw-r--r-- | libs/gui/IGraphicBufferProducerFlattenables.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/gui/IGraphicBufferProducerFlattenables.cpp b/libs/gui/IGraphicBufferProducerFlattenables.cpp index 8b2e2ddc59..393e1c3068 100644 --- a/libs/gui/IGraphicBufferProducerFlattenables.cpp +++ b/libs/gui/IGraphicBufferProducerFlattenables.cpp @@ -105,7 +105,7 @@ status_t IGraphicBufferProducer::QueueBufferInput::unflatten( : std::nullopt; #endif // COM_ANDROID_GRAPHICS_LIBUI_FLAGS_APPLY_PICTURE_PROFILES - fence = new Fence(); + fence = sp<Fence>::make(); status_t result = fence->unflatten(buffer, size, fds, count); if (result != NO_ERROR) { return result; @@ -228,7 +228,7 @@ status_t IGraphicBufferProducer::RequestBufferOutput::unflatten( FlattenableUtils::read(fBuffer, size, result); int32_t isBufferNull = 0; FlattenableUtils::read(fBuffer, size, isBufferNull); - buffer = new GraphicBuffer(); + buffer = sp<GraphicBuffer>::make(); if (!isBufferNull) { status_t status = buffer->unflatten(fBuffer, size, fds, count); if (status != NO_ERROR) { @@ -323,7 +323,7 @@ status_t IGraphicBufferProducer::DequeueBufferOutput::unflatten( FlattenableUtils::read(buffer, size, slot); FlattenableUtils::read(buffer, size, bufferAge); - fence = new Fence(); + fence = sp<Fence>::make(); status_t status = fence->unflatten(buffer, size, fds, count); if (status != NO_ERROR) { return status; @@ -395,7 +395,7 @@ status_t IGraphicBufferProducer::CancelBufferInput::unflatten( FlattenableUtils::read(buffer, size, slot); - fence = new Fence(); + fence = sp<Fence>::make(); return fence->unflatten(buffer, size, fds, count); } |