summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2023-01-09 13:38:48 -0600
committer Patrick Williams <pdwilliams@google.com> 2023-01-09 13:38:48 -0600
commit3190813d238c92aa6c4f63f7f672d9abf1be70bb (patch)
treee77a8e41d6f1fd1eccca7c7ef595c57d68208f1a /services/surfaceflinger/RegionSamplingThread.cpp
parentd26c1061e861b4418b7cf2dd56067d444c870de7 (diff)
Fix RenderArea use after free error
When RenderEngine is single threaded, renderScreenImpl immediately calls present instead of moving it into the returned future. This caused the unique_ptr<RenderArea> to be destroyed when renderScreenImpl returned, deleting RenderArea prematurely. We can use a shared_ptr to ensure that RenderArea is only deleted once both captureScreenCommon and present no longer need it. Bug: 264827546 Test: atest ScreenCaptureTest Test: go/wm-smoke Change-Id: I8b591bec7c6ad07df9fa9b7f62495dac10a68a93
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions