Skip to content

Commit 84f46f2

Browse files
committed
hwcomposer: Snapshot buffer is now also freed in release
1 parent c852dc6 commit 84f46f2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

hwcomposer/hwcomposer.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,8 @@ static int hwc_set(struct hwc_composer_device_1* dev,size_t numDisplays,
825825

826826
wl_surface_commit(surface);
827827

828-
if (window->snapshot_buffer) {
829-
// Snapshot buffer should be detached by now, clean up
830-
wl_buffer_destroy(window->snapshot_buffer->buffer);
831-
delete window->snapshot_buffer;
832-
window->snapshot_buffer = nullptr;
833-
}
828+
// Snapshot buffer is no longer used
829+
window->snapshot_buffer = nullptr;
834830

835831
const int kAcquireWarningMS = 100;
836832
err = sync_wait(fb_layer->acquireFenceFd, kAcquireWarningMS);

0 commit comments

Comments
 (0)